aboutsummaryrefslogtreecommitdiff
path: root/src/test/coins_tests.cpp
diff options
context:
space:
mode:
authorJames O'Beirne <james.obeirne@gmail.com>2019-12-03 13:25:35 -0500
committerJames O'Beirne <james.obeirne@pm.me>2023-01-20 10:36:48 -0500
commit79cedc36afe2e72e42839d861734d73d545d21b8 (patch)
treeb828b92dababbe42ced74b7ec7ff6484a995ccd7 /src/test/coins_tests.cpp
parentc0b6c40bb084752f686ff77e6883ee6fd16eba26 (diff)
coins: add Sync() method to allow flush without cacheCoins drop
In certain circumstances, we may want to flush to disk without emptying `cacheCoins`, which affects performance. UTXO snapshot activation is one such case. This method is currently unused and this commit does not change any behavior. Incorporates feedback from John Newbery. Co-authored-by: Suhas Daftuar <sdaftuar@gmail.com>
Diffstat (limited to 'src/test/coins_tests.cpp')
-rw-r--r--src/test/coins_tests.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/coins_tests.cpp b/src/test/coins_tests.cpp
index b5f961a239..d55dea4f83 100644
--- a/src/test/coins_tests.cpp
+++ b/src/test/coins_tests.cpp
@@ -53,7 +53,7 @@ public:
uint256 GetBestBlock() const override { return hashBestBlock_; }
- bool BatchWrite(CCoinsMap& mapCoins, const uint256& hashBlock) override
+ bool BatchWrite(CCoinsMap& mapCoins, const uint256& hashBlock, bool erase = true) override
{
for (CCoinsMap::iterator it = mapCoins.begin(); it != mapCoins.end(); ) {
if (it->second.flags & CCoinsCacheEntry::DIRTY) {