diff --git a/crates/chain/tests/common/tx_template.rs b/crates/chain/tests/common/tx_template.rs index 605a0ba7e..cd96fa189 100644 --- a/crates/chain/tests/common/tx_template.rs +++ b/crates/chain/tests/common/tx_template.rs @@ -1,7 +1,7 @@ use rand::distributions::{Alphanumeric, DistString}; use std::collections::HashMap; -use bdk_chain::{tx_graph::TxGraph, BlockId, SpkTxOutIndex}; +use bdk_chain::{tx_graph::TxGraph, Anchor, SpkTxOutIndex}; use bitcoin::{ locktime::absolute::LockTime, secp256k1::Secp256k1, OutPoint, ScriptBuf, Sequence, Transaction, TxIn, TxOut, Txid, Witness, @@ -49,11 +49,11 @@ impl TxOutTemplate { } #[allow(dead_code)] -pub fn init_graph<'a>( - tx_templates: impl IntoIterator>, -) -> (TxGraph, SpkTxOutIndex, HashMap<&'a str, Txid>) { +pub fn init_graph<'a, A: Anchor + Copy + 'a>( + tx_templates: impl IntoIterator>, +) -> (TxGraph, SpkTxOutIndex, HashMap<&'a str, Txid>) { let (descriptor, _) = Descriptor::parse_descriptor(&Secp256k1::signing_only(), "tr(tprv8ZgxMBicQKsPd3krDUsBAmtnRsK3rb8u5yi1zhQgMhF1tR8MW7xfE4rnrbbsrbPR52e7rKapu6ztw1jXveJSCGHEriUGZV7mCe88duLp5pj/86'/1'/0'/0/*)").unwrap(); - let mut graph = TxGraph::::default(); + let mut graph = TxGraph::::default(); let mut spk_index = SpkTxOutIndex::default(); (0..10).for_each(|index| { spk_index.insert_spk(