mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
chore: rm chainspec max gas limit (#13308)
This commit is contained in:
@ -5,8 +5,8 @@ use crate::{AsEthApiError, FromEthApiError, IntoEthApiError};
|
||||
use alloy_primitives::U256;
|
||||
use alloy_rpc_types_eth::{state::StateOverride, transaction::TransactionRequest, BlockId};
|
||||
use futures::Future;
|
||||
use reth_chainspec::{EthChainSpec, MIN_TRANSACTION_GAS};
|
||||
use reth_provider::{ChainSpecProvider, StateProvider};
|
||||
use reth_chainspec::MIN_TRANSACTION_GAS;
|
||||
use reth_provider::StateProvider;
|
||||
use reth_revm::{
|
||||
database::StateProviderDatabase,
|
||||
db::CacheDB,
|
||||
@ -116,9 +116,7 @@ pub trait EstimateCall: Call {
|
||||
}
|
||||
|
||||
// We can now normalize the highest gas limit to a u64
|
||||
let mut highest_gas_limit: u64 = highest_gas_limit
|
||||
.try_into()
|
||||
.unwrap_or_else(|_| self.provider().chain_spec().max_gas_limit());
|
||||
let mut highest_gas_limit = highest_gas_limit.saturating_to::<u64>();
|
||||
|
||||
// If the provided gas limit is less than computed cap, use that
|
||||
env.tx.gas_limit = env.tx.gas_limit.min(highest_gas_limit);
|
||||
|
||||
Reference in New Issue
Block a user