сhore(tests): remove obsolete debug-output coverage
What changed, and why it matters
This commit simply removes two test cases that only printed debug output to the console. No production code, logic, or security behavior is changed. It is a routine cleanup with no security relevance.
No security action needed. Treat as routine test-maintenance cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch deletes two unit tests—sequence_debug_output in bitcoin/src/blockdata/transaction.rs and witness_debug_can_display_empty_element in primitives/src/witness.rs—that existed only to exercise Debug formatting via println!. It also removes the now-unused std::println import. No library code, parsing, serialization, or cryptographic logic is modified.
Changed components
bitcoin/src/blockdata/transaction.rs (tests only)primitives/src/witness.rs (tests only)Inspect captured patch +0 / −14
diff --git a/bitcoin/src/blockdata/transaction.rs b/bitcoin/src/blockdata/transaction.rs
index 71e310a3..a8c045fa 100644
--- a/bitcoin/src/blockdata/transaction.rs
+++ b/bitcoin/src/blockdata/transaction.rs
@@ -2092,12 +2092,7 @@ mod tests {
}
#[test]
- fn sequence_debug_output() {
- let seq = Sequence::from_seconds_floor(1000);
- println!("{:?}", seq)
- }
- #[test]
fn outpoint_format() {
let outpoint = OutPoint::COINBASE_PREVOUT;
diff --git a/primitives/src/witness.rs b/primitives/src/witness.rs
index 693e1b8b..0a4a6d5f 100644
--- a/primitives/src/witness.rs
+++ b/primitives/src/witness.rs
@@ -577,9 +577,6 @@ impl<'a> Arbitrary<'a> for Witness {
mod test {
#[cfg(feature = "alloc")]
use alloc::vec;
- #[cfg(feature = "std")]
- use std::println;
-
use super::*;
// Appends all the indices onto the end of a list of elements.
@@ -595,13 +592,7 @@ mod test {
fn single_empty_element() -> Witness { Witness::from([[0u8; 0]]) }
#[test]
- #[cfg(feature = "std")]
- fn witness_debug_can_display_empty_element() {
- let witness = single_empty_element();
- println!("{:?}", witness);
- }
- #[test]
fn witness_single_empty_element() {
let mut got = Witness::new();
got.push([]);
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.