refactor: remove unused assumeutxo methods

After feedback from Russ, I realized that there are some extraneous assumeutxo methods
that are not necessary and probably just overly confusing. These include

- `Validated*()`
- `IsBackgroundIBD()`

and they can be removed.
This commit is contained in:
James O'Beirne
2021-07-15 10:40:28 -04:00
parent 9f6bb53935
commit ac4051d891
3 changed files with 10 additions and 59 deletions

View File

@@ -5007,22 +5007,6 @@ bool ChainstateManager::IsSnapshotActive() const
return m_snapshot_chainstate && m_active_chainstate == m_snapshot_chainstate.get();
}
CChainState& ChainstateManager::ValidatedChainstate() const
{
LOCK(::cs_main);
if (m_snapshot_chainstate && IsSnapshotValidated()) {
return *m_snapshot_chainstate.get();
}
assert(m_ibd_chainstate);
return *m_ibd_chainstate.get();
}
bool ChainstateManager::IsBackgroundIBD(CChainState* chainstate) const
{
LOCK(::cs_main);
return (m_snapshot_chainstate && chainstate == m_ibd_chainstate.get());
}
void ChainstateManager::Unload()
{
for (CChainState* chainstate : this->GetAll()) {