mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
primitive-traits: use alloy INITIAL_BASE_FEE constant (#12022)
This commit is contained in:
@ -3,7 +3,7 @@ pub use alloy_eips::eip1559::BaseFeeParams;
|
||||
use alloc::{boxed::Box, sync::Arc, vec::Vec};
|
||||
use alloy_chains::{Chain, NamedChain};
|
||||
use alloy_consensus::constants::EMPTY_WITHDRAWALS;
|
||||
use alloy_eips::eip7685::EMPTY_REQUESTS_HASH;
|
||||
use alloy_eips::{eip1559::INITIAL_BASE_FEE, eip7685::EMPTY_REQUESTS_HASH};
|
||||
use alloy_genesis::Genesis;
|
||||
use alloy_primitives::{address, b256, Address, BlockNumber, B256, U256};
|
||||
use derive_more::From;
|
||||
@ -19,7 +19,7 @@ use reth_network_peers::{
|
||||
sepolia_nodes, NodeRecord,
|
||||
};
|
||||
use reth_primitives_traits::{
|
||||
constants::{EIP1559_INITIAL_BASE_FEE, HOLESKY_GENESIS_HASH, SEPOLIA_GENESIS_HASH},
|
||||
constants::{HOLESKY_GENESIS_HASH, SEPOLIA_GENESIS_HASH},
|
||||
Header, SealedHeader,
|
||||
};
|
||||
use reth_trie_common::root::state_root_ref_unhashed;
|
||||
@ -314,7 +314,7 @@ impl ChainSpec {
|
||||
pub fn initial_base_fee(&self) -> Option<u64> {
|
||||
// If the base fee is set in the genesis block, we use that instead of the default.
|
||||
let genesis_base_fee =
|
||||
self.genesis.base_fee_per_gas.map(|fee| fee as u64).unwrap_or(EIP1559_INITIAL_BASE_FEE);
|
||||
self.genesis.base_fee_per_gas.map(|fee| fee as u64).unwrap_or(INITIAL_BASE_FEE);
|
||||
|
||||
// If London is activated at genesis, we set the initial base fee as per EIP-1559.
|
||||
self.hardforks.fork(EthereumHardfork::London).active_at_block(0).then_some(genesis_base_fee)
|
||||
|
||||
Reference in New Issue
Block a user