bitcoin: Remove duplicate exact_size_iterator
What changed, and why it matters
This commit simply deletes a duplicate unit test from one crate because the same test already exists in an upstream crate. It does not change any production code, behavior, or security properties.
No action needed; this is a routine test-cleanup change with no security relevance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch removes the exact_sized_iterator test from bitcoin/src/blockdata/witness.rs. The identical test remains in the primitives crate, and upstream tests are preferred over downstream duplicates. No runtime code, APIs, or logic are modified.
Changed components
bitcoin/src/blockdata/witness.rsInspect captured patch +0 / −14
diff --git a/bitcoin/src/blockdata/witness.rs b/bitcoin/src/blockdata/witness.rs
index e4535e88..acb6a596 100644
--- a/bitcoin/src/blockdata/witness.rs
+++ b/bitcoin/src/blockdata/witness.rs
@@ -262,20 +262,6 @@ mod test {
use crate::taproot::LeafVersion;
use crate::Transaction;
- #[test]
- fn exact_sized_iterator() {
- let mut witness = Witness::default();
- for i in 0..5 {
- assert_eq!(witness.iter().len(), i);
- witness.push([0u8]);
- }
- let mut iter = witness.iter();
- for i in (0..=5).rev() {
- assert_eq!(iter.len(), i);
- iter.next();
- }
- }
-
#[test]
fn push_ecdsa_sig() {
// The very first signature in block 734,958
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.