From 8e2ecfe2496d8a015f3ee8723025a438feffbd28 Mon Sep 17 00:00:00 2001 From: James O'Beirne Date: Wed, 11 Dec 2019 16:41:40 -0500 Subject: validation: add CChainState.m_from_snapshot_blockhash This parameter is unused, but in future commits will allow ChainstateManager to differentiate between chainstates created from a UTXO snapshot from those that weren't. --- src/validation.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/validation.h') diff --git a/src/validation.h b/src/validation.h index a5335edc43..07d90ab110 100644 --- a/src/validation.h +++ b/src/validation.h @@ -591,8 +591,8 @@ private: std::unique_ptr m_coins_views; public: - CChainState(BlockManager& blockman) : m_blockman(blockman) {} - CChainState(); + explicit CChainState(BlockManager& blockman) : m_blockman(blockman) {} + explicit CChainState(uint256 from_snapshot_blockhash = uint256()); /** * Initialize the CoinsViews UTXO set database management data structures. The in-memory @@ -620,6 +620,13 @@ public: //! @see CChain, CBlockIndex. CChain m_chain; + /** + * The blockhash which is the base of the snapshot this chainstate was created from. + * + * IsNull() if this chainstate was not created from a snapshot. + */ + const uint256 m_from_snapshot_blockhash{}; + /** * The set of all CBlockIndex entries with BLOCK_VALID_TRANSACTIONS (for itself and all ancestors) and * as good as our current tip or better. Entries may be failed, though, and pruning nodes may be -- cgit v1.2.3