feat: relax chainspec bounds on NodeBuilder and rpc types (#11160)

This commit is contained in:
Arsenii Kulikov
2024-09-24 20:47:04 +03:00
committed by GitHub
parent d3114b4eec
commit ae3d279cc3
38 changed files with 222 additions and 157 deletions

View File

@ -52,6 +52,9 @@ pub trait EthereumHardforks: Hardforks {
}
}
/// Returns the final total difficulty if the Paris hardfork is known.
fn get_final_paris_total_difficulty(&self) -> Option<U256>;
/// Returns the final total difficulty if the given block number is after the Paris hardfork.
///
/// Note: technically this would also be valid for the block before the paris upgrade, but this

View File

@ -14,7 +14,7 @@ use alloc::{boxed::Box, vec::Vec};
/// Generic trait over a set of ordered hardforks
#[auto_impl::auto_impl(&, Arc)]
pub trait Hardforks: Default + Clone {
pub trait Hardforks: Clone {
/// Retrieves [`ForkCondition`] from `fork`. If `fork` is not present, returns
/// [`ForkCondition::Never`].
fn fork<H: Hardfork>(&self, fork: H) -> ForkCondition;