15 void ResetNextWrite() { m_next_write = NodeClock::time_point::max() - 1
s; }
18 static_cast<TestChainstate*
>(
cs)->ResetNextWrite();
37 const std::shared_ptr<const CBlock>& block,
#define Assert(val)
Identity function.
The block chain is a tree shaped structure starting with the genesis block at the root,...
Implement this to subscribe to events generated in validation and mempool.
virtual void BlockConnected(ChainstateRole role, const std::shared_ptr< const CBlock > &block, const CBlockIndex *pindex)
Notifies listeners of a block being connected.
Chainstate stores and provides an API to update our local knowledge of the current best chain.
bool IsInitialBlockDownload() const
Check whether we are doing an initial block download (synchronizing from disk or network)
std::atomic< bool > m_cached_finished_ibd
Whether initial block download has ended and IsInitialBlockDownload should return false from now on.
Chainstate &InitializeChainstate(CTxMemPool *mempool) EXCLUSIVE_LOCKS_REQUIRED(std::vector< Chainstate * GetAll)()
Instantiate a new chainstate.
static void BlockConnected(ChainstateRole role, CValidationInterface &obj, const std::shared_ptr< const CBlock > &block, const CBlockIndex *pindex)
ChainstateRole
This enum describes the various roles a specific Chainstate instance can take.
void DisableNextWrite()
Disable the next write of all chainstates.
void JumpOutOfIbd()
Toggle IsInitialBlockDownload from true to false.
void ResetIbd()
Reset the ibd cache to its initial state.