mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-03 19:49:12 +01:00
refactor: rename will_reuse_cache to reallocate_cache
More accurately reflects the purpose of the parameter, since we will keep reusing the cache but don't want to reallocate it.
This commit is contained in:
@@ -2983,7 +2983,7 @@ bool Chainstate::DisconnectTip(BlockValidationState& state, DisconnectedBlockTra
|
||||
LogError("DisconnectTip(): DisconnectBlock %s failed\n", pindexDelete->GetBlockHash().ToString());
|
||||
return false;
|
||||
}
|
||||
view.Flush(/*will_reuse_cache=*/false); // local CCoinsViewCache goes out of scope
|
||||
view.Flush(/*reallocate_cache=*/false); // local CCoinsViewCache goes out of scope
|
||||
}
|
||||
LogDebug(BCLog::BENCH, "- Disconnect block: %.2fms\n",
|
||||
Ticks<MillisecondsDouble>(SteadyClock::now() - time_start));
|
||||
@@ -3118,7 +3118,7 @@ bool Chainstate::ConnectTip(
|
||||
Ticks<MillisecondsDouble>(time_3 - time_2),
|
||||
Ticks<SecondsDouble>(m_chainman.time_connect_total),
|
||||
Ticks<MillisecondsDouble>(m_chainman.time_connect_total) / m_chainman.num_blocks_total);
|
||||
view.Flush(/*will_reuse_cache=*/false); // No need to reallocate since it only has capacity for 1 block
|
||||
view.Flush(/*reallocate_cache=*/false); // No need to reallocate since it only has capacity for 1 block
|
||||
}
|
||||
const auto time_4{SteadyClock::now()};
|
||||
m_chainman.time_flush += time_4 - time_3;
|
||||
@@ -4921,7 +4921,7 @@ bool Chainstate::ReplayBlocks()
|
||||
}
|
||||
|
||||
cache.SetBestBlock(pindexNew->GetBlockHash());
|
||||
cache.Flush(/*will_reuse_cache=*/false); // local CCoinsViewCache goes out of scope
|
||||
cache.Flush(/*reallocate_cache=*/false); // local CCoinsViewCache goes out of scope
|
||||
m_chainman.GetNotifications().progress(bilingual_str{}, 100, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user