Skip to content

Commit 5d74053

Browse files
committed
tests: common: Update create_txin signature.
1 parent b67ea4d commit 5d74053

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

tests/common/mod.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,9 @@ pub fn create_address_from_witness() -> Address {
5555
}
5656

5757
#[allow(unused)]
58-
pub fn create_txin(txid: Txid) -> TxIn {
59-
let witness = create_witness().1;
60-
58+
pub fn create_txin(txid: Txid, vout: u32) -> TxIn {
6159
TxIn {
62-
previous_output: OutPoint { txid, vout: 0 },
63-
witness,
60+
previous_output: OutPoint { txid, vout },
6461
..Default::default()
6562
}
6663
}

tests/transaction.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,14 @@ async fn send_get_raw_transaction_async() {
165165
);
166166

167167
// Send some funds to some other user.
168-
let txin = common::create_txin(tx1.compute_txid());
168+
let txin = common::create_txin(tx1.compute_txid(), 0);
169169
let txout = TxOut {
170170
value: Amount::from_sat(0x45),
171171
script_pubkey: deposit_address.script_pubkey(),
172172
};
173173
let tx1 = common::create_transaction(vec![txin], vec![txout]);
174174

175-
let txin = common::create_txin(tx2.compute_txid());
175+
let txin = common::create_txin(tx2.compute_txid(), 0);
176176
let txout = TxOut {
177177
value: Amount::from_sat(0x1F),
178178
script_pubkey: deposit_address.script_pubkey(),

0 commit comments

Comments
 (0)