@@ -7,7 +7,7 @@ use std::{
77} ;
88
99use alloy:: { hex:: ToHexExt , primitives:: Address , sol_types:: Eip712Domain } ;
10- use anyhow:: { anyhow, ensure, Result } ;
10+ use anyhow:: { anyhow, ensure} ;
1111use bigdecimal:: { num_bigint:: BigInt , ToPrimitive } ;
1212use indexer_monitor:: { EscrowAccounts , SubgraphClient } ;
1313use jsonrpsee:: { core:: client:: ClientT , rpc_params} ;
@@ -165,7 +165,7 @@ impl Actor for SenderAllocation {
165165 & self ,
166166 _myself : ActorRef < Self :: Msg > ,
167167 args : Self :: Arguments ,
168- ) -> std :: result :: Result < Self :: State , ActorProcessingErr > {
168+ ) -> Result < Self :: State , ActorProcessingErr > {
169169 let sender_account_ref = args. sender_account_ref . clone ( ) ;
170170 let allocation_id = args. allocation_id ;
171171 let mut state = SenderAllocationState :: new ( args) . await ?;
@@ -207,7 +207,7 @@ impl Actor for SenderAllocation {
207207 & self ,
208208 _myself : ActorRef < Self :: Msg > ,
209209 state : & mut Self :: State ,
210- ) -> std :: result :: Result < ( ) , ActorProcessingErr > {
210+ ) -> Result < ( ) , ActorProcessingErr > {
211211 tracing:: info!(
212212 sender = %state. sender,
213213 allocation_id = %state. allocation_id,
@@ -258,7 +258,7 @@ impl Actor for SenderAllocation {
258258 _myself : ActorRef < Self :: Msg > ,
259259 message : Self :: Msg ,
260260 state : & mut Self :: State ,
261- ) -> std :: result :: Result < ( ) , ActorProcessingErr > {
261+ ) -> Result < ( ) , ActorProcessingErr > {
262262 tracing:: trace!(
263263 sender = %state. sender,
264264 allocation_id = %state. allocation_id,
@@ -394,18 +394,21 @@ impl SenderAllocationState {
394394 } )
395395 }
396396
397- async fn recalculate_all_unaggregated_fees ( & self ) -> Result < UnaggregatedReceipts > {
397+ async fn recalculate_all_unaggregated_fees ( & self ) -> anyhow :: Result < UnaggregatedReceipts > {
398398 self . calculate_fee_until_last_id ( i64:: MAX ) . await
399399 }
400400
401- async fn calculate_unaggregated_fee ( & self ) -> Result < UnaggregatedReceipts > {
401+ async fn calculate_unaggregated_fee ( & self ) -> anyhow :: Result < UnaggregatedReceipts > {
402402 self . calculate_fee_until_last_id ( self . unaggregated_fees . last_id as i64 )
403403 . await
404404 }
405405
406406 /// Delete obsolete receipts in the DB w.r.t. the last RAV in DB, then update the tap manager
407407 /// with the latest unaggregated fees from the database.
408- async fn calculate_fee_until_last_id ( & self , last_id : i64 ) -> Result < UnaggregatedReceipts > {
408+ async fn calculate_fee_until_last_id (
409+ & self ,
410+ last_id : i64 ,
411+ ) -> anyhow:: Result < UnaggregatedReceipts > {
409412 tracing:: trace!( "calculate_unaggregated_fee()" ) ;
410413 self . tap_manager . remove_obsolete_receipts ( ) . await ?;
411414
@@ -458,7 +461,7 @@ impl SenderAllocationState {
458461 } )
459462 }
460463
461- async fn calculate_invalid_receipts_fee ( & self ) -> Result < UnaggregatedReceipts > {
464+ async fn calculate_invalid_receipts_fee ( & self ) -> anyhow :: Result < UnaggregatedReceipts > {
462465 tracing:: trace!( "calculate_invalid_receipts_fee()" ) ;
463466 let signers = signers_trimmed ( self . escrow_accounts . clone ( ) , self . sender ) . await ?;
464467
@@ -501,7 +504,7 @@ impl SenderAllocationState {
501504 } )
502505 }
503506
504- async fn request_rav ( & mut self ) -> Result < ( ) > {
507+ async fn request_rav ( & mut self ) -> anyhow :: Result < ( ) > {
505508 match self . rav_requester_single ( ) . await {
506509 Ok ( rav) => {
507510 self . unaggregated_fees = self . calculate_unaggregated_fee ( ) . await ?;
@@ -691,7 +694,7 @@ impl SenderAllocationState {
691694 }
692695 }
693696
694- pub async fn mark_rav_last ( & self ) -> Result < ( ) > {
697+ pub async fn mark_rav_last ( & self ) -> anyhow :: Result < ( ) > {
695698 tracing:: info!(
696699 sender = %self . sender,
697700 allocation_id = %self . allocation_id,
@@ -731,7 +734,7 @@ impl SenderAllocationState {
731734 async fn store_invalid_receipts (
732735 & mut self ,
733736 receipts : & [ ReceiptWithState < Failed > ] ,
734- ) -> Result < ( ) > {
737+ ) -> anyhow :: Result < ( ) > {
735738 let reciepts_len = receipts. len ( ) ;
736739 let mut reciepts_signers = Vec :: with_capacity ( reciepts_len) ;
737740 let mut encoded_signatures = Vec :: with_capacity ( reciepts_len) ;
@@ -835,7 +838,7 @@ impl SenderAllocationState {
835838 expected_rav : & ReceiptAggregateVoucher ,
836839 rav : & EIP712SignedMessage < ReceiptAggregateVoucher > ,
837840 reason : & str ,
838- ) -> Result < ( ) > {
841+ ) -> anyhow :: Result < ( ) > {
839842 sqlx:: query!(
840843 r#"
841844 INSERT INTO scalar_tap_rav_requests_failed (
0 commit comments