@@ -199,7 +199,6 @@ impl WalletTransactionChecker for ManagedWalletInfo {
199199 if context. is_instant_send ( ) {
200200 self . instant_send_locks . insert ( txid) ;
201201 }
202- self . increment_transactions ( ) ;
203202
204203 let wallet_net = result. total_received as i64 - result. total_sent as i64 ;
205204 tracing:: info!(
@@ -723,11 +722,6 @@ mod tests {
723722 "Transaction should be stored"
724723 ) ;
725724 let tx_count_before = managed_account. transactions . len ( ) ;
726- let total_tx_count_before = managed_wallet. metadata . total_transactions ;
727- assert_eq ! (
728- total_tx_count_before, 1 ,
729- "total_transactions should be 1 after first processing"
730- ) ;
731725
732726 // Second processing (simulating rescan) - should be marked as existing
733727 let result2 =
@@ -749,12 +743,6 @@ mod tests {
749743 "Transaction count should not increase on rescan"
750744 ) ;
751745
752- // Verify total_transactions metadata hasn't changed on rescan
753- assert_eq ! (
754- managed_wallet. metadata. total_transactions, total_tx_count_before,
755- "total_transactions should not increase on rescan"
756- ) ;
757-
758746 // Verify UTXO state is unchanged after rescan
759747 assert_eq ! ( managed_account. utxos. len( ) , 1 , "Should still have exactly one UTXO" ) ;
760748 let utxo = managed_account. utxos . values ( ) . next ( ) . expect ( "Should have UTXO" ) ;
@@ -880,8 +868,6 @@ mod tests {
880868 assert_eq ! ( ctx. transaction( & txid) . context, TransactionContext :: Mempool ) ;
881869 assert ! ( !ctx. first_utxo( ) . is_confirmed, "Mempool UTXO should be unconfirmed" ) ;
882870
883- let total_tx_before = ctx. managed_wallet . metadata . total_transactions ;
884-
885871 // Same transaction now seen in a block
886872 let block_hash = BlockHash :: from_slice ( & [ 5u8 ; 32 ] ) . expect ( "Should create block hash" ) ;
887873 let block_context =
@@ -898,11 +884,6 @@ mod tests {
898884 assert_eq ! ( record. block_info( ) . unwrap( ) . block_hash, block_hash) ;
899885 assert_eq ! ( record. block_info( ) . unwrap( ) . timestamp, 1700000000 ) ;
900886 assert ! ( ctx. first_utxo( ) . is_confirmed, "UTXO should now be confirmed" ) ;
901-
902- assert_eq ! (
903- ctx. managed_wallet. metadata. total_transactions, total_tx_before,
904- "total_transactions should not increase for confirmation of existing tx"
905- ) ;
906887 }
907888
908889 /// Test the full lifecycle: mempool -> IS -> block -> chain-locked block -> late IS
@@ -916,7 +897,6 @@ mod tests {
916897 assert_eq ! ( ctx. managed_wallet. balance( ) . unconfirmed( ) , 200_000 ) ;
917898 assert_eq ! ( ctx. managed_wallet. balance( ) . confirmed( ) , 0 ) ;
918899 assert_eq ! ( ctx. managed_wallet. balance( ) . spendable( ) , 200_000 ) ;
919- assert_eq ! ( ctx. managed_wallet. metadata. total_transactions, 1 ) ;
920900
921901 // Stage 2: IS lock
922902 let is_lock = InstantLock {
@@ -930,7 +910,6 @@ mod tests {
930910 assert_eq ! ( ctx. managed_wallet. balance( ) . unconfirmed( ) , 0 ) ;
931911 assert ! ( ctx. first_utxo( ) . is_instantlocked) ;
932912 assert ! ( !ctx. first_utxo( ) . is_confirmed) ;
933- assert_eq ! ( ctx. managed_wallet. metadata. total_transactions, 1 ) ;
934913 assert ! ( ctx. managed_wallet. instant_send_locks. contains( & txid) ) ;
935914
936915 // Verify the TransactionRecord stores the IS lock payload
@@ -966,7 +945,6 @@ mod tests {
966945 let result = ctx. check_transaction ( & tx, cl_context) . await ;
967946 assert ! ( !result. is_new_transaction) ;
968947 assert_eq ! ( ctx. managed_wallet. balance( ) . spendable( ) , 200_000 ) ;
969- assert_eq ! ( ctx. managed_wallet. metadata. total_transactions, 1 ) ;
970948
971949 // Stage 5: late IS lock on already-confirmed tx should be ignored
972950 let balance_before = ctx. managed_wallet . balance ( ) ;
@@ -1004,7 +982,6 @@ mod tests {
1004982 . await ;
1005983 assert ! ( !result2. is_new_transaction) ;
1006984 assert_eq ! ( ctx. managed_wallet. balance( ) . spendable( ) , 150_000 ) ;
1007- assert_eq ! ( ctx. managed_wallet. metadata. total_transactions, 1 ) ;
1008985 }
1009986
1010987 /// Test that the InstantSend branch backfills a `TransactionRecord` on accounts
0 commit comments