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:
Ryan Ofsky
2024-05-31 07:00:40 -04:00
parent 4dfe383912
commit d9e82299fc
7 changed files with 15 additions and 24 deletions

View File

@@ -391,7 +391,9 @@ public:
//! removed transactions and already added new transactions.
virtual void requestMempoolTransactions(Notifications& notifications) = 0;
//! Return true if an assumed-valid chain is in use.
//! Return true if an assumed-valid snapshot is in use. Note that this
//! returns true even after the snapshot is validated, until the next node
//! restart.
virtual bool hasAssumedValidChain() = 0;
//! Get internal node context. Useful for testing, but not