aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorJames O'Beirne <james.obeirne@gmail.com>2019-12-11 16:41:40 -0500
committerJames O'Beirne <james.obeirne@pm.me>2020-03-17 13:27:39 -0400
commit8e2ecfe2496d8a015f3ee8723025a438feffbd28 (patch)
tree5e9c5694508d57a7317d66e14f310f31e056aeec /src/validation.h
parentd2d0a04a661fde731a212b0489fe211566ff5ca8 (diff)
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.
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h11
1 files changed, 9 insertions, 2 deletions
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<CoinsViews> 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
@@ -621,6 +621,13 @@ public:
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
* missing the data for the block.