aboutsummaryrefslogtreecommitdiff
path: root/src/chain.h
diff options
context:
space:
mode:
authorJames O'Beirne <james.obeirne@pm.me>2020-08-25 13:50:23 -0400
committerJames O'Beirne <james.obeirne@pm.me>2021-02-12 07:53:29 -0600
commitf6e2da5fb7c6406c37612c838c998078ea8d2252 (patch)
treea543e8de37216084fe3cc7a32234e873377003e5 /src/chain.h
parent7a6c46b37edb8bfa0085d202aa7e9427d5e4fceb (diff)
simplify ChainstateManager::SnapshotBlockhash() return semantics
Don't return null snapshotblockhash values to avoid caller complexity/confusion.
Diffstat (limited to 'src/chain.h')
-rw-r--r--src/chain.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/chain.h b/src/chain.h
index 43e8a39f36..04a5db5a17 100644
--- a/src/chain.h
+++ b/src/chain.h
@@ -163,14 +163,27 @@ public:
//! Number of transactions in this block.
//! Note: in a potential headers-first mode, this number cannot be relied upon
+ //! Note: this value is faked during UTXO snapshot load to ensure that
+ //! LoadBlockIndex() will load index entries for blocks that we lack data for.
+ //! @sa ActivateSnapshot
unsigned int nTx{0};
//! (memory only) Number of transactions in the chain up to and including this block.
//! This value will be non-zero only if and only if transactions for this block and all its parents are available.
//! Change to 64-bit type when necessary; won't happen before 2030
+ //!
+ //! Note: this value is faked during use of a UTXO snapshot because we don't
+ //! have the underlying block data available during snapshot load.
+ //! @sa AssumeutxoData
+ //! @sa ActivateSnapshot
unsigned int nChainTx{0};
//! Verification status of this block. See enum BlockStatus
+ //!
+ //! Note: this value is modified to show BLOCK_OPT_WITNESS during UTXO snapshot
+ //! load to avoid the block index being spuriously rewound.
+ //! @sa RewindBlockIndex
+ //! @sa ActivateSnapshot
uint32_t nStatus{0};
//! block header