mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
perf: improve genesis handling (#10878)
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
use reth_chainspec::{
|
||||
BaseFeeParams, Chain, ChainHardforks, ChainSpec, EthereumHardfork, ForkCondition,
|
||||
once_cell_set, BaseFeeParams, Chain, ChainHardforks, ChainSpec, EthereumHardfork, ForkCondition,
|
||||
};
|
||||
use reth_network_peers::NodeRecord;
|
||||
use reth_primitives::{b256, B256};
|
||||
@ -14,7 +14,8 @@ pub(crate) fn bsc_chain_spec() -> Arc<ChainSpec> {
|
||||
ChainSpec {
|
||||
chain: Chain::from_id(56),
|
||||
genesis: serde_json::from_str(include_str!("./genesis.json")).expect("deserialize genesis"),
|
||||
genesis_hash: Some(GENESIS),
|
||||
genesis_hash: once_cell_set(GENESIS),
|
||||
genesis_header: Default::default(),
|
||||
paris_block_and_final_difficulty: None,
|
||||
hardforks: ChainHardforks::new(vec![(
|
||||
EthereumHardfork::Shanghai.boxed(),
|
||||
|
||||
Reference in New Issue
Block a user