@@ -60,8 +60,8 @@ fn create_basic_transaction() -> Transaction {
6060 }
6161}
6262
63- #[ test]
64- fn test_coinbase_transaction_routing_to_bip44_receive_address ( ) {
63+ #[ tokio :: test]
64+ async fn test_coinbase_transaction_routing_to_bip44_receive_address ( ) {
6565 let network = Network :: Testnet ;
6666
6767 // Create a wallet with a BIP44 account
@@ -109,13 +109,15 @@ fn test_coinbase_transaction_routing_to_bip44_receive_address() {
109109 } ;
110110
111111 // Check the coinbase transaction
112- let result = managed_wallet_info. check_transaction (
113- & coinbase_tx,
114- network,
115- context,
116- & mut wallet,
117- true , // update state
118- ) ;
112+ let result = managed_wallet_info
113+ . check_transaction (
114+ & coinbase_tx,
115+ network,
116+ context,
117+ & mut wallet,
118+ true , // update state
119+ )
120+ . await ;
119121
120122 // The coinbase transaction should be recognized as relevant
121123 assert ! ( result. is_relevant, "Coinbase transaction to BIP44 receive address should be relevant" ) ;
@@ -136,8 +138,8 @@ fn test_coinbase_transaction_routing_to_bip44_receive_address() {
136138 ) ;
137139}
138140
139- #[ test]
140- fn test_coinbase_transaction_routing_to_bip44_change_address ( ) {
141+ #[ tokio :: test]
142+ async fn test_coinbase_transaction_routing_to_bip44_change_address ( ) {
141143 let network = Network :: Testnet ;
142144
143145 // Create a wallet with a BIP44 account
@@ -185,13 +187,15 @@ fn test_coinbase_transaction_routing_to_bip44_change_address() {
185187 } ;
186188
187189 // Check the coinbase transaction
188- let result = managed_wallet_info. check_transaction (
189- & coinbase_tx,
190- network,
191- context,
192- & mut wallet,
193- true , // update state
194- ) ;
190+ let result = managed_wallet_info
191+ . check_transaction (
192+ & coinbase_tx,
193+ network,
194+ context,
195+ & mut wallet,
196+ true , // update state
197+ )
198+ . await ;
195199
196200 // The coinbase transaction should be recognized as relevant even to change address
197201 assert ! ( result. is_relevant, "Coinbase transaction to BIP44 change address should be relevant" ) ;
@@ -212,8 +216,8 @@ fn test_coinbase_transaction_routing_to_bip44_change_address() {
212216 ) ;
213217}
214218
215- #[ test]
216- fn test_update_state_flag_behavior ( ) {
219+ #[ tokio :: test]
220+ async fn test_update_state_flag_behavior ( ) {
217221 let network = Network :: Testnet ;
218222
219223 let mut wallet = Wallet :: new_random ( & [ network] , WalletAccountCreationOptions :: Default )
@@ -257,7 +261,8 @@ fn test_update_state_flag_behavior() {
257261 } ;
258262
259263 // First check with update_state = false
260- let result1 = managed_wallet_info. check_transaction ( & tx, network, context, & mut wallet, false ) ;
264+ let result1 =
265+ managed_wallet_info. check_transaction ( & tx, network, context, & mut wallet, false ) . await ;
261266
262267 assert ! ( result1. is_relevant) ;
263268
@@ -278,13 +283,15 @@ fn test_update_state_flag_behavior() {
278283 }
279284
280285 // Now check with update_state = true
281- let result2 = managed_wallet_info. check_transaction (
282- & tx,
283- network,
284- context,
285- & mut wallet,
286- true , // update state
287- ) ;
286+ let result2 = managed_wallet_info
287+ . check_transaction (
288+ & tx,
289+ network,
290+ context,
291+ & mut wallet,
292+ true , // update state
293+ )
294+ . await ;
288295
289296 assert ! ( result2. is_relevant) ;
290297 assert_eq ! (
@@ -346,8 +353,8 @@ fn test_coinbase_routing() {
346353 assert ! ( !accounts. contains( & AccountTypeToCheck :: ProviderOwnerKeys ) ) ;
347354}
348355
349- #[ test]
350- fn test_coinbase_transaction_with_payload_routing ( ) {
356+ #[ tokio :: test]
357+ async fn test_coinbase_transaction_with_payload_routing ( ) {
351358 // Test coinbase with special payload routing to BIP44 account
352359 let network = Network :: Testnet ;
353360 let mut wallet = Wallet :: new_random ( & [ network] , WalletAccountCreationOptions :: Default )
@@ -402,8 +409,9 @@ fn test_coinbase_transaction_with_payload_routing() {
402409 timestamp : Some ( 1234567890 ) ,
403410 } ;
404411
405- let result =
406- managed_wallet_info. check_transaction ( & coinbase_tx, network, context, & mut wallet, true ) ;
412+ let result = managed_wallet_info
413+ . check_transaction ( & coinbase_tx, network, context, & mut wallet, true )
414+ . await ;
407415
408416 assert ! ( result. is_relevant, "Coinbase with payload should be relevant" ) ;
409417 assert_eq ! ( result. total_received, 5000000000 , "Should have received block reward" ) ;
0 commit comments