mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Use TX IDs for Bitcoin Eventualities
They're a bit more binding, smaller, provided by the Rust bitcoin library, sane, and we don't have to worry about malleability since all of our inputs are SegWit.
This commit is contained in:
@@ -279,6 +279,7 @@ async_sequential! {
|
||||
FEE
|
||||
).unwrap();
|
||||
let needed_fee = tx.needed_fee();
|
||||
let expected_id = tx.txid();
|
||||
let tx = sign(&keys, tx);
|
||||
|
||||
assert_eq!(tx.output.len(), 3);
|
||||
@@ -322,6 +323,7 @@ async_sequential! {
|
||||
let mut hash = *tx.txid().as_raw_hash().as_byte_array();
|
||||
hash.reverse();
|
||||
assert_eq!(tx, rpc.get_transaction(&hash).await.unwrap());
|
||||
assert_eq!(expected_id, hash);
|
||||
}
|
||||
|
||||
async fn test_data() {
|
||||
|
||||
Reference in New Issue
Block a user