Drop WitnessCommitment::GENESIS_PREVIOUS_BLOCK_HASH
What changed, and why it matters
This commit simply removes an unused public constant from the WitnessCommitment type. It is a routine cleanup with no security implications.
No security action needed. Treat as normal API cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch deletes the WitnessCommitment::GENESIS_PREVIOUS_BLOCK_HASH constant, which was a zero-filled dummy hash. The commit message states it had no use and was likely copied from BlockHash. There is no functional code change, no cryptographic operation modified, and no vulnerability introduced or fixed.
Changed components
primitives/src/hash_types/witness_commitment.rsInspect captured patch +0 / −5
diff --git a/primitives/src/hash_types/witness_commitment.rs b/primitives/src/hash_types/witness_commitment.rs
index 91a1c9fc..ee0649de 100644
--- a/primitives/src/hash_types/witness_commitment.rs
+++ b/primitives/src/hash_types/witness_commitment.rs
@@ -15,11 +15,6 @@ pub struct WitnessCommitment(sha256d::Hash);
super::impl_debug!(WitnessCommitment);
-impl WitnessCommitment {
- /// Dummy hash used as the previous blockhash of the genesis block.
- pub const GENESIS_PREVIOUS_BLOCK_HASH: Self = Self::from_byte_array([0; 32]);
-}
-
// The new hash wrapper type.
type HashType = WitnessCommitment;
// The inner hash type from `hashes`.
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.