aboutsummaryrefslogtreecommitdiff
path: root/src/chain.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/chain.h')
-rw-r--r--src/chain.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/chain.h b/src/chain.h
index bb70dbd8bc..13f7582385 100644
--- a/src/chain.h
+++ b/src/chain.h
@@ -66,7 +66,7 @@ public:
READWRITE(VARINT(obj.nTimeLast));
}
- CBlockFileInfo() {}
+ CBlockFileInfo() = default;
std::string ToString() const;
@@ -102,7 +102,7 @@ enum BlockStatus : uint32_t {
*
* If a block's validity is at least VALID_TRANSACTIONS, CBlockIndex::nTx will be set. If a block and all previous
* blocks back to the genesis block or an assumeutxo snapshot block are at least VALID_TRANSACTIONS,
- * CBlockIndex::nChainTx will be set.
+ * CBlockIndex::m_chain_tx_count will be set.
*/
BLOCK_VALID_TRANSACTIONS = 3,
@@ -173,13 +173,12 @@ public:
//! This value will be non-zero if this block and all previous blocks back
//! to the genesis block or an assumeutxo snapshot block have reached the
//! VALID_TRANSACTIONS level.
- //! Change to 64-bit type before 2024 (assuming worst case of 60 byte transactions).
- unsigned int nChainTx{0};
+ uint64_t m_chain_tx_count{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.
+ //! load to avoid a spurious startup failure requiring -reindex.
//! @sa NeedsRedownload
//! @sa ActivateSnapshot
uint32_t nStatus GUARDED_BY(::cs_main){0};
@@ -254,10 +253,10 @@ public:
* Does not imply the transactions are consensus-valid (ConnectTip might fail)
* Does not imply the transactions are still stored on disk. (IsBlockPruned might return true)
*
- * Note that this will be true for the snapshot base block, if one is loaded, since its nChainTx value will have
+ * Note that this will be true for the snapshot base block, if one is loaded, since its m_chain_tx_count value will have
* been set manually based on the related AssumeutxoData entry.
*/
- bool HaveNumChainTxs() const { return nChainTx != 0; }
+ bool HaveNumChainTxs() const { return m_chain_tx_count != 0; }
NodeSeconds Time() const
{