mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: use new ChainHardforks type on ChainSpec (#9065)
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
|
||||
use reth_chainspec::{Chain, ChainSpec, Hardfork};
|
||||
use reth_chainspec::{Chain, ChainSpec, EthereumHardfork, EthereumHardforks};
|
||||
use reth_consensus::{Consensus, ConsensusError, PostExecutionInput};
|
||||
use reth_consensus_common::validation::{
|
||||
validate_4844_header_standalone, validate_against_parent_4844,
|
||||
@ -51,7 +51,7 @@ impl EthBeaconConsensus {
|
||||
) -> Result<(), ConsensusError> {
|
||||
// Determine the parent gas limit, considering elasticity multiplier on the London fork.
|
||||
let parent_gas_limit =
|
||||
if self.chain_spec.fork(Hardfork::London).transitions_at_block(header.number) {
|
||||
if self.chain_spec.fork(EthereumHardfork::London).transitions_at_block(header.number) {
|
||||
parent.gas_limit *
|
||||
self.chain_spec
|
||||
.base_fee_params_at_timestamp(header.timestamp)
|
||||
@ -153,7 +153,7 @@ impl Consensus for EthBeaconConsensus {
|
||||
) -> Result<(), ConsensusError> {
|
||||
let is_post_merge = self
|
||||
.chain_spec
|
||||
.fork(Hardfork::Paris)
|
||||
.fork(EthereumHardfork::Paris)
|
||||
.active_at_ttd(total_difficulty, header.difficulty);
|
||||
|
||||
if is_post_merge {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_chainspec::{ChainSpec, EthereumHardforks};
|
||||
use reth_consensus::ConsensusError;
|
||||
use reth_primitives::{
|
||||
gas_spent_by_transactions, BlockWithSenders, Bloom, GotExpected, Receipt, Request, B256,
|
||||
|
||||
Reference in New Issue
Block a user