Skip to content

Commit

Permalink
Enhance
Browse files Browse the repository at this point in the history
  • Loading branch information
casey committed Nov 26, 2024
1 parent 03c1cc5 commit 68ea0dc
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions integration_test/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ use {
bitcoin::{
absolute::LockTime,
address::{NetworkChecked, NetworkUnchecked},
consensus::encode::{deserialize, serialize_hex},
consensus::{
encode::{deserialize, serialize_hex},
Encodable,
},
hashes::{hex::FromHex, Hash},
opcodes, script, secp256k1, sighash, transaction, Address, Amount, CompressedPublicKey,
Network, OutPoint, PrivateKey, ScriptBuf, Sequence, SignedAmount, Transaction, TxIn, TxOut,
Expand Down Expand Up @@ -677,7 +680,16 @@ fn test_send_raw_transaction(cl: &Client) {
version: transaction::Version::ONE,
};

let tx = cl.fund_raw_transaction(&tx, None, Some(true)).unwrap();
let mut buffer = Vec::new();

{
tx.version.consensus_encode(&mut buffer).unwrap();
tx.input.consensus_encode(&mut buffer).unwrap();
tx.output.consensus_encode(&mut buffer).unwrap();
tx.lock_time.consensus_encode(&mut buffer).unwrap();
}

let tx = cl.fund_raw_transaction(&buffer, None, None).unwrap();

cl.send_raw_transaction(&tx.hex, None).unwrap_err();
}
Expand Down

0 comments on commit 68ea0dc

Please sign in to comment.