coins: use hashBlock setter internally for CCoinsViewCache methods
Co-authored-by: l0rinc <pap.lorinc@gmail.com>
This commit is contained in:
1 file changed
+3
-2
+3
-2
@@ -7,6 +7,7 @@
|
|||||||
#include <consensus/consensus.h>
|
#include <consensus/consensus.h>
|
||||||
#include <logging.h>
|
#include <logging.h>
|
||||||
#include <random.h>
|
#include <random.h>
|
||||||
|
#include <uint256.h>
|
||||||
#include <util/trace.h>
|
#include <util/trace.h>
|
||||||
|
|
||||||
TRACEPOINT_SEMAPHORE(utxocache, add);
|
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)
|
void CCoinsViewCache::Flush(bool will_reuse_cache)
|
||||||
@@ -278,7 +279,7 @@ void CCoinsViewCache::Reset() noexcept
|
|||||||
{
|
{
|
||||||
cacheCoins.clear();
|
cacheCoins.clear();
|
||||||
cachedCoinsUsage = 0;
|
cachedCoinsUsage = 0;
|
||||||
hashBlock.SetNull();
|
SetBestBlock(uint256::ZERO);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCoinsViewCache::Uncache(const COutPoint& hash)
|
void CCoinsViewCache::Uncache(const COutPoint& hash)
|
||||||
|
|||||||
Reference in new issue
Block a user