aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-11-23 20:05:07 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-12-15 17:46:01 +0100
commitfa47b5c100f81c65c15b5a6afaf6c91bc0861264 (patch)
tree61bb183b370cec9573e75132bc8a211cb416f7a0 /src/validation.h
parentfa3d62cf7b3501a056b34c5458c14d2fe6a55bd7 (diff)
Move AcceptBlockHeader to ChainstateManager
This is needed for the next commit.
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/validation.h b/src/validation.h
index 27b8f4e906..dd29abc607 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -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