aboutsummaryrefslogtreecommitdiff
path: root/src/primitives
diff options
context:
space:
mode:
Diffstat (limited to 'src/primitives')
-rw-r--r--src/primitives/block.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/primitives/block.h b/src/primitives/block.h
index 99accfc7dd..832f8a03f7 100644
--- a/src/primitives/block.h
+++ b/src/primitives/block.h
@@ -71,8 +71,10 @@ public:
// network and disk
std::vector<CTransactionRef> vtx;
- // memory only
- mutable bool fChecked;
+ // Memory-only flags for caching expensive checks
+ mutable bool fChecked; // CheckBlock()
+ mutable bool m_checked_witness_commitment{false}; // CheckWitnessCommitment()
+ mutable bool m_checked_merkle_root{false}; // CheckMerkleRoot()
CBlock()
{
@@ -95,6 +97,8 @@ public:
CBlockHeader::SetNull();
vtx.clear();
fChecked = false;
+ m_checked_witness_commitment = false;
+ m_checked_merkle_root = false;
}
CBlockHeader GetBlockHeader() const