@@ -96,7 +96,10 @@ use revm::{
96
96
primitives:: eip7702:: PER_EMPTY_ACCOUNT_COST ,
97
97
} ;
98
98
use std:: { sync:: Arc , time:: Duration } ;
99
- use tokio:: sync:: mpsc:: { UnboundedReceiver , unbounded_channel} ;
99
+ use tokio:: {
100
+ sync:: mpsc:: { UnboundedReceiver , unbounded_channel} ,
101
+ try_join,
102
+ } ;
100
103
101
104
/// The client version: `anvil/v{major}.{minor}.{patch}`
102
105
pub const CLIENT_VERSION : & str = concat ! ( "anvil/v" , env!( "CARGO_PKG_VERSION" ) ) ;
@@ -762,12 +765,9 @@ impl EthApi {
762
765
block_number : Option < BlockId > ,
763
766
) -> Result < alloy_rpc_types:: eth:: AccountInfo > {
764
767
node_info ! ( "eth_getAccountInfo" ) ;
765
- let account = self
766
- . backend
767
- . get_account_at_block ( address, Some ( self . block_request ( block_number) . await ?) )
768
- . await ?;
769
- let code =
770
- self . backend . get_code ( address, Some ( self . block_request ( block_number) . await ?) ) . await ?;
768
+ let account = self . get_account ( address, block_number) ;
769
+ let code = self . get_code ( address, block_number) ;
770
+ let ( account, code) = try_join ! ( account, code) ?;
771
771
Ok ( alloy_rpc_types:: eth:: AccountInfo {
772
772
balance : account. balance ,
773
773
nonce : account. nonce ,
0 commit comments