Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 6,086 Lines • ▼ Show 20 Lines | if (is_snapshot || (!is_snapshot && !m_active_chainstate)) { | ||||
m_active_chainstate = to_modify.get(); | m_active_chainstate = to_modify.get(); | ||||
} else { | } else { | ||||
throw std::logic_error("unexpected chainstate activation"); | throw std::logic_error("unexpected chainstate activation"); | ||||
} | } | ||||
return *to_modify; | return *to_modify; | ||||
} | } | ||||
CChain &ChainstateManager::ActiveChain() const { | CChainState &ChainstateManager::ActiveChainstate() const { | ||||
assert(m_active_chainstate); | assert(m_active_chainstate); | ||||
return m_active_chainstate->m_chain; | return *m_active_chainstate; | ||||
} | } | ||||
bool ChainstateManager::IsSnapshotActive() const { | bool ChainstateManager::IsSnapshotActive() const { | ||||
return m_snapshot_chainstate && | return m_snapshot_chainstate && | ||||
m_active_chainstate == m_snapshot_chainstate.get(); | m_active_chainstate == m_snapshot_chainstate.get(); | ||||
} | } | ||||
CChainState &ChainstateManager::ValidatedChainstate() const { | CChainState &ChainstateManager::ValidatedChainstate() const { | ||||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |