@@ -12,7 +12,7 @@ use crate::eoa::{
1212 } ,
1313 worker:: error:: EoaExecutorWorkerError ,
1414} ;
15- use crate :: metrics:: { current_timestamp_ms , calculate_duration_seconds, EoaMetrics } ;
15+ use crate :: metrics:: { EoaMetrics , calculate_duration_seconds, current_timestamp_ms } ;
1616use crate :: webhook:: { WebhookJobHandler , queue_webhook_envelopes} ;
1717
1818#[ derive( Debug , Clone ) ]
@@ -62,7 +62,10 @@ impl SafeRedisTransaction for ProcessBorrowedTransactions<'_> {
6262 }
6363
6464 fn watch_keys ( & self ) -> Vec < String > {
65- vec ! [ self . keys. borrowed_transactions_hashmap_name( ) ]
65+ vec ! [
66+ self . keys. borrowed_transactions_hashmap_name( ) ,
67+ self . keys. recycled_nonces_zset_name( ) ,
68+ ]
6669 }
6770
6871 async fn validation (
@@ -121,15 +124,13 @@ impl SafeRedisTransaction for ProcessBorrowedTransactions<'_> {
121124 SubmissionResultType :: Success => {
122125 // Record metrics: transaction queued to sent
123126 let sent_timestamp = current_timestamp_ms ( ) ;
124- let queued_to_sent_duration = calculate_duration_seconds (
125- result. transaction . queued_at ,
126- sent_timestamp
127- ) ;
127+ let queued_to_sent_duration =
128+ calculate_duration_seconds ( result. transaction . queued_at , sent_timestamp) ;
128129 // Record metrics using the clean EoaMetrics abstraction
129130 self . eoa_metrics . record_transaction_sent (
130131 self . keys . eoa ,
131132 self . keys . chain_id ,
132- queued_to_sent_duration
133+ queued_to_sent_duration,
133134 ) ;
134135
135136 // Add to submitted zset
@@ -189,7 +190,7 @@ impl SafeRedisTransaction for ProcessBorrowedTransactions<'_> {
189190 // Update transaction data status
190191 let tx_data_key = self . keys . transaction_data_key_name ( transaction_id) ;
191192 pipeline. hset ( & tx_data_key, "status" , "pending" ) ;
192-
193+
193194 // ask for this nonce to be recycled because we did not consume the nonce
194195 pipeline. zadd ( self . keys . recycled_nonces_zset_name ( ) , nonce, nonce) ;
195196
0 commit comments