doc: clarify UpdateUncommittedBlockStructures
What changed, and why it matters
This commit only changes a code comment in a header file to clarify when a particular block-building helper function is safe to use. No executable code was modified, so it cannot introduce or fix a security vulnerability on its own.
No security action required; treat as a normal documentation-only change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff updates the Doxygen comment for Chainstate::UpdateUncommittedBlockStructures() in src/validation.h. It adds the qualification that the function is safe for submitted blocks only if those blocks honor the default_witness_commitment from the block template. There are no logic, API, or behavior changes.
Changed components
src/validation.h documentation comment onlyInspect captured patch +5 / −1
diff --git a/src/validation.h b/src/validation.h
index 291c1021..cd448f3c 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -1276,7 +1276,11 @@ public:
//! ResizeCoinsCaches() as needed.
void MaybeRebalanceCaches() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
- /** Update uncommitted block structures (currently: only the witness reserved value). This is safe for submitted blocks. */
+ /**
+ * Update uncommitted block structures (currently: only the witness reserved
+ * value). This is safe for submitted blocks as long as they honor
+ * default_witness_commitment from the template.
+ */
void UpdateUncommittedBlockStructures(CBlock& block, const CBlockIndex* pindexPrev) const;
/** Produce the necessary coinbase commitment for a block (modifies the hash, don't call for mined blocks). */
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.