mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Move AcceptBlockHeader to ChainstateManager
This is needed for the next commit.
This commit is contained in:
@@ -454,16 +454,6 @@ public:
|
||||
//! Mark one block file as pruned (modify associated database entries)
|
||||
void PruneOneBlockFile(const int fileNumber) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
|
||||
/**
|
||||
* If a block header hasn't already been seen, call CheckBlockHeader on it, ensure
|
||||
* that it doesn't descend from an invalid block, and then add it to m_block_index.
|
||||
*/
|
||||
bool AcceptBlockHeader(
|
||||
const CBlockHeader& block,
|
||||
BlockValidationState& state,
|
||||
const CChainParams& chainparams,
|
||||
CBlockIndex** ppindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
|
||||
CBlockIndex* LookupBlockIndex(const uint256& hash) const EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
|
||||
//! Returns last CBlockIndex* that is a checkpoint
|
||||
@@ -902,6 +892,17 @@ private:
|
||||
CAutoFile& coins_file,
|
||||
const SnapshotMetadata& metadata);
|
||||
|
||||
/**
|
||||
* If a block header hasn't already been seen, call CheckBlockHeader on it, ensure
|
||||
* that it doesn't descend from an invalid block, and then add it to m_block_index.
|
||||
*/
|
||||
bool AcceptBlockHeader(
|
||||
const CBlockHeader& block,
|
||||
BlockValidationState& state,
|
||||
const CChainParams& chainparams,
|
||||
CBlockIndex** ppindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
friend CChainState;
|
||||
|
||||
public:
|
||||
std::thread m_load_block;
|
||||
//! A single BlockManager instance is shared across each constructed
|
||||
|
||||
Reference in New Issue
Block a user