mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: add missing hardfork convenience fns (#7678)
This commit is contained in:
@ -779,6 +779,18 @@ impl ChainSpec {
|
||||
.unwrap_or_else(|| self.is_fork_active_at_timestamp(Hardfork::Cancun, timestamp))
|
||||
}
|
||||
|
||||
/// Convenience method to check if [Hardfork::Byzantium] is active at a given block number.
|
||||
#[inline]
|
||||
pub fn is_byzantium_active_at_block(&self, block_number: u64) -> bool {
|
||||
self.fork(Hardfork::Byzantium).active_at_block(block_number)
|
||||
}
|
||||
|
||||
/// Convenience method to check if [Hardfork::SpuriousDragon] is active at a given block number.
|
||||
#[inline]
|
||||
pub fn is_spurious_dragon_active_at_block(&self, block_number: u64) -> bool {
|
||||
self.fork(Hardfork::SpuriousDragon).active_at_block(block_number)
|
||||
}
|
||||
|
||||
/// Convenience method to check if [Hardfork::Homestead] is active at a given block number.
|
||||
#[inline]
|
||||
pub fn is_homestead_active_at_block(&self, block_number: u64) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user