mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
refactor: Delete ChainstateManager::IsSnapshotActive() method
IsSnapshotActive() method is only called one place outside of tests and asserts, and is confusing because it returns true even after the snapshot is fully validated. The documentation which said this "implies that a background validation chainstate is also in use" is also incorrect, because after the snapshot is validated, the background chainstate gets disabled and IsUsable() would return false.
This commit is contained in:
@@ -845,7 +845,8 @@ public:
|
||||
}
|
||||
bool hasAssumedValidChain() override
|
||||
{
|
||||
return chainman().IsSnapshotActive();
|
||||
LOCK(::cs_main);
|
||||
return bool{chainman().CurrentChainstate().m_from_snapshot_blockhash};
|
||||
}
|
||||
|
||||
NodeContext* context() override { return &m_node; }
|
||||
|
||||
Reference in New Issue
Block a user