chore(chainspec): remove MAINNET usage from ChainSpec::default (#14565)

This commit is contained in:
DaniPopes
2025-02-18 16:36:57 +01:00
committed by GitHub
parent c0a30f051e
commit 3485ce45be
5 changed files with 15 additions and 7 deletions

View File

@ -4,6 +4,10 @@ use alloy_primitives::b256;
/// Gas per transaction not creating a contract.
pub const MIN_TRANSACTION_GAS: u64 = 21_000u64;
/// Mainnet prune delete limit.
pub const MAINNET_PRUNE_DELETE_LIMIT: usize = 20000;
/// Deposit contract address: `0x00000000219ab540356cbb839cbe05303d7705fa`
pub(crate) const MAINNET_DEPOSIT_CONTRACT: DepositContract = DepositContract::new(
MAINNET_DEPOSIT_CONTRACT_ADDRESS,

View File

@ -12,8 +12,8 @@
extern crate alloc;
/// Chain specific constants
pub(crate) mod constants;
pub use constants::MIN_TRANSACTION_GAS;
mod constants;
pub use constants::*;
mod api;
/// The chain info module.

View File

@ -1,6 +1,9 @@
pub use alloy_eips::eip1559::BaseFeeParams;
use crate::{constants::MAINNET_DEPOSIT_CONTRACT, EthChainSpec};
use crate::{
constants::{MAINNET_DEPOSIT_CONTRACT, MAINNET_PRUNE_DELETE_LIMIT},
EthChainSpec,
};
use alloc::{boxed::Box, collections::BTreeMap, string::String, sync::Arc, vec::Vec};
use alloy_chains::{Chain, NamedChain};
use alloy_consensus::{
@ -320,7 +323,7 @@ impl Default for ChainSpec {
hardforks: Default::default(),
deposit_contract: Default::default(),
base_fee_params: BaseFeeParamsKind::Constant(BaseFeeParams::ethereum()),
prune_delete_limit: MAINNET.prune_delete_limit,
prune_delete_limit: MAINNET_PRUNE_DELETE_LIMIT,
blob_params: Default::default(),
}
}