p2p: Remove `OutPointExt` from `p2p` tests
What changed, and why it matters
This is a tiny test-only cleanup commit. It removes an unused trait import and replaces a helper constructor with direct struct field assignment in a unit test. There is no security relevance.
No action required. This commit is not security-relevant.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit removes use bitcoin::transaction::OutPointExt; from p2p/src/bip152.rs test module and changes OutPoint::new(dummy_txid, 0) to OutPoint { txid: dummy_txid, vout: 0 }. This is purely a dependency-reduction refactor inside test code; it does not alter production logic, behavior, or any public API.
Changed components
p2p/src/bip152.rs (test module only)Inspect captured patch +1 / −2
diff --git a/p2p/src/bip152.rs b/p2p/src/bip152.rs
index 171ce047..56dd3b14 100644
--- a/p2p/src/bip152.rs
+++ b/p2p/src/bip152.rs
@@ -475,7 +475,6 @@ mod test {
use bitcoin::consensus::encode::{deserialize, serialize};
use bitcoin::locktime::absolute;
use bitcoin::merkle_tree::TxMerkleNode;
- use bitcoin::transaction::OutPointExt;
use bitcoin::{
transaction, Amount, BlockChecked, BlockTime, CompactTarget, OutPoint, ScriptPubKeyBuf,
ScriptSigBuf, Sequence, TxIn, TxOut, Txid, Witness,
@@ -487,7 +486,7 @@ mod test {
version: transaction::Version::ONE,
lock_time: absolute::LockTime::from_consensus(2),
inputs: vec![TxIn {
- previous_output: OutPoint::new(dummy_txid, 0),
+ previous_output: OutPoint { txid: dummy_txid, vout: 0 },
script_sig: ScriptSigBuf::new(),
sequence: Sequence(1),
witness: Witness::new(),
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.