mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
fix(rpc): propagate provider error for best block number (#22674)
This commit is contained in:
@@ -15,7 +15,7 @@ use alloy_dyn_abi::TypedData;
|
||||
use alloy_eips::{eip2718::Encodable2718, BlockId};
|
||||
use alloy_network::{TransactionBuilder, TransactionBuilder4844};
|
||||
use alloy_primitives::{Address, Bytes, TxHash, B256, U256};
|
||||
use alloy_rpc_types_eth::{BlockNumberOrTag, TransactionInfo};
|
||||
use alloy_rpc_types_eth::TransactionInfo;
|
||||
use futures::{Future, StreamExt};
|
||||
use reth_chain_state::CanonStateSubscriptions;
|
||||
use reth_primitives_traits::{
|
||||
@@ -343,9 +343,7 @@ pub trait EthTransactions: LoadTransaction<Provider: BlockReaderIdExt> {
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
let Ok(high) = self.provider().best_block_number() else {
|
||||
return Err(EthApiError::HeaderNotFound(BlockNumberOrTag::Latest.into()).into());
|
||||
};
|
||||
let high = self.provider().best_block_number().map_err(Self::Error::from_eth_err)?;
|
||||
|
||||
// Perform a binary search over the block range to find the block in which the sender's
|
||||
// nonce reached the requested nonce.
|
||||
|
||||
Reference in New Issue
Block a user