@@ -9,7 +9,9 @@ use bdk_chain::{
99 local_chain:: LocalChain ,
1010 tx_graph, BlockId , ChainPosition , ConfirmationHeightAnchor ,
1111} ;
12- use bitcoin:: { secp256k1:: Secp256k1 , OutPoint , Script , ScriptBuf , Transaction , TxIn , TxOut } ;
12+ use bitcoin:: {
13+ secp256k1:: Secp256k1 , Amount , OutPoint , Script , ScriptBuf , Transaction , TxIn , TxOut ,
14+ } ;
1315use miniscript:: Descriptor ;
1416
1517/// Ensure [`IndexedTxGraph::insert_relevant_txs`] can successfully index transactions NOT presented
@@ -35,11 +37,11 @@ fn insert_relevant_txs() {
3537 let tx_a = Transaction {
3638 output : vec ! [
3739 TxOut {
38- value: 10_000 ,
40+ value: Amount :: from_int_btc ( 10_000 ) ,
3941 script_pubkey: spk_0,
4042 } ,
4143 TxOut {
42- value: 20_000 ,
44+ value: Amount :: from_int_btc ( 20_000 ) ,
4345 script_pubkey: spk_1,
4446 } ,
4547 ] ,
@@ -155,7 +157,7 @@ fn test_list_owned_txouts() {
155157 ..Default :: default ( )
156158 } ] ,
157159 output : vec ! [ TxOut {
158- value: 70000 ,
160+ value: Amount :: from_int_btc ( 70000 ) ,
159161 script_pubkey: trusted_spks[ 0 ] . to_owned( ) ,
160162 } ] ,
161163 ..common:: new_tx ( 0 )
@@ -164,7 +166,7 @@ fn test_list_owned_txouts() {
164166 // tx2 is an incoming transaction received at untrusted keychain at block 1.
165167 let tx2 = Transaction {
166168 output : vec ! [ TxOut {
167- value: 30000 ,
169+ value: Amount :: from_int_btc ( 30000 ) ,
168170 script_pubkey: untrusted_spks[ 0 ] . to_owned( ) ,
169171 } ] ,
170172 ..common:: new_tx ( 0 )
@@ -177,7 +179,7 @@ fn test_list_owned_txouts() {
177179 ..Default :: default ( )
178180 } ] ,
179181 output : vec ! [ TxOut {
180- value: 10000 ,
182+ value: Amount :: from_int_btc ( 10000 ) ,
181183 script_pubkey: trusted_spks[ 1 ] . to_owned( ) ,
182184 } ] ,
183185 ..common:: new_tx ( 0 )
@@ -186,7 +188,7 @@ fn test_list_owned_txouts() {
186188 // tx4 is an external transaction receiving at untrusted keychain, unconfirmed.
187189 let tx4 = Transaction {
188190 output : vec ! [ TxOut {
189- value: 20000 ,
191+ value: Amount :: from_int_btc ( 20000 ) ,
190192 script_pubkey: untrusted_spks[ 1 ] . to_owned( ) ,
191193 } ] ,
192194 ..common:: new_tx ( 0 )
@@ -195,7 +197,7 @@ fn test_list_owned_txouts() {
195197 // tx5 is spending tx3 and receiving change at trusted keychain, unconfirmed.
196198 let tx5 = Transaction {
197199 output : vec ! [ TxOut {
198- value: 15000 ,
200+ value: Amount :: from_int_btc ( 15000 ) ,
199201 script_pubkey: trusted_spks[ 2 ] . to_owned( ) ,
200202 } ] ,
201203 ..common:: new_tx ( 0 )
0 commit comments