mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
refactor: Delete ChainstateManager::IsSnapshotValidated() method
IsSnapshotValidated() is only called one place outside of tests, and is use redundantly in some tests, asserting that a snapshot is not validated when a snapshot chainstate does not even exist. Simplify by dropping the method and checking Chainstate m_assumeutxo field directly.
This commit is contained in:
@@ -6367,7 +6367,7 @@ void ChainstateManager::RecalculateBestHeader()
|
||||
bool ChainstateManager::ValidatedSnapshotCleanup(Chainstate& validated_cs, Chainstate& unvalidated_cs)
|
||||
{
|
||||
AssertLockHeld(::cs_main);
|
||||
if (!this->IsSnapshotValidated()) {
|
||||
if (unvalidated_cs.m_assumeutxo != Assumeutxo::VALIDATED) {
|
||||
// No need to clean up.
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user