File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -777,7 +777,7 @@ impl EthApi {
777777 if let Some ( fork) = self . get_fork ( ) {
778778 // check if the number predates the fork, if in fork mode
779779 if let BlockRequest :: Number ( number) = self . block_request ( block_number) . await ?
780- && fork. predates_fork ( number)
780+ && fork. predates_fork_inclusive ( number)
781781 {
782782 // if this predates the fork we need to fetch balance, nonce, code individually
783783 // because the provider might not support this endpoint
Original file line number Diff line number Diff line change @@ -1639,6 +1639,22 @@ async fn test_fork_get_account_info() {
16391639 code: Default :: default ( ) ,
16401640 }
16411641 ) ;
1642+
1643+ // Check account info at block number, see https://github.com/foundry-rs/foundry/issues/12072
1644+ let info = provider
1645+ . get_account_info ( address ! ( "0x19e53a7397bE5AA7908fE9eA991B03710bdC74Fd" ) )
1646+ // predates fork
1647+ . number ( BLOCK_NUMBER )
1648+ . await
1649+ . unwrap ( ) ;
1650+ assert_eq ! (
1651+ info,
1652+ AccountInfo {
1653+ balance: U256 :: from( 14352720829244098514u64 ) ,
1654+ nonce: 6690 ,
1655+ code: Default :: default ( ) ,
1656+ }
1657+ ) ;
16421658}
16431659
16441660fn assert_hardfork_config (
You can’t perform that action at this time.
0 commit comments