From 041758f5eda5725daad4ae20f66c7d19ba02d063 Mon Sep 17 00:00:00 2001 From: Andrew Toth Date: Sun, 25 Jan 2026 18:33:25 -0500 Subject: [PATCH] coins: use hashBlock setter internally for CCoinsViewCache methods Co-authored-by: l0rinc --- src/coins.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/coins.cpp b/src/coins.cpp index 2afbbbff38c..449adcde03c 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include TRACEPOINT_SEMAPHORE(utxocache, add); @@ -250,7 +251,7 @@ void CCoinsViewCache::BatchWrite(CoinsViewCacheCursor& cursor, const uint256& ha } } } - hashBlock = hashBlockIn; + SetBestBlock(hashBlockIn); } void CCoinsViewCache::Flush(bool will_reuse_cache) @@ -278,7 +279,7 @@ void CCoinsViewCache::Reset() noexcept { cacheCoins.clear(); cachedCoinsUsage = 0; - hashBlock.SetNull(); + SetBestBlock(uint256::ZERO); } void CCoinsViewCache::Uncache(const COutPoint& hash)