5 #ifndef BITCOIN_INDEX_BASE_H 6 #define BITCOIN_INDEX_BASE_H 40 DB(
const fs::path& path,
size_t n_cache_size,
41 bool f_memory =
false,
bool f_wipe =
false,
bool f_obfuscate =
false);
54 std::atomic<bool> m_synced{
false};
57 std::atomic<const CBlockIndex*> m_best_block_index{
nullptr};
80 void BlockConnected(
const std::shared_ptr<const CBlock>& block,
const CBlockIndex* pindex)
override;
82 void ChainStateFlushed(
const CBlockLocator& locator)
override;
92 virtual bool CommitInternal(
CDBBatch& batch);
98 virtual DB& GetDB()
const = 0;
101 virtual const char* GetName()
const = 0;
112 bool BlockUntilSyncedToCurrentChain()
const;
127 #endif // BITCOIN_INDEX_BASE_H
CThreadInterrupt m_interrupt
Describes a place in the block chain to another node such that if the other node doesn't have the sam...
Batch of changes queued to be written to a CDBWrapper.
Implement this to subscribe to events generated in validation.
The database stores a block locator of the chain the database is synced to so that the index can effi...
std::thread m_thread_sync
virtual bool WriteBlock(const CBlock &block, const CBlockIndex *pindex)
Write update index entries for a newly connected block.
Base class for indices of blockchain data.
void Interrupt(NodeContext &node)
Interrupt threads.
The block chain is a tree shaped structure starting with the genesis block at the root...