Remove unused comment on Encodable trait implementation
What changed, and why it matters
This commit only removes a documentation comment that duplicated an existing warning elsewhere in the code. No program logic, behavior, or security boundary changed.
No security action needed. This is a documentation cleanup only.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff deletes a rustdoc ‘Panics’ comment on the Encodable trait implementation for BlockTransactionsRequest in bitcoin/src/bip152.rs. Trait impl comments are not rendered by rustdoc, and the same warning already exists on the struct’s indexes field. The consensus_encode function body is untouched, so there is no functional or security change.
Changed components
bitcoin/src/bip152.rsInspect captured patch +0 / −4
diff --git a/bitcoin/src/bip152.rs b/bitcoin/src/bip152.rs
index 3c018caf..829a4b0e 100644
--- a/bitcoin/src/bip152.rs
+++ b/bitcoin/src/bip152.rs
@@ -289,10 +289,6 @@ pub struct BlockTransactionsRequest {
}
impl Encodable for BlockTransactionsRequest {
- /// # Panics
- ///
- /// Panics if the index overflows [`u64::MAX`]. This happens when [`BlockTransactionsRequest::indexes`]
- /// contains an entry with the value [`u64::MAX`] as `u64` overflows during differential encoding.
fn consensus_encode<W: Write + ?Sized>(&self, w: &mut W) -> Result<usize, io::Error> {
let mut len = self.block_hash.consensus_encode(w)?;
// Manually encode indexes because they are differentially encoded as CompactSize.
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.