mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: integrate blob_params_at_timestamp (#14128)
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
|
||||
use alloy_consensus::EMPTY_OMMER_ROOT_HASH;
|
||||
use alloy_eips::{eip7840::BlobParams, merge::ALLOWED_FUTURE_BLOCK_TIME_SECONDS};
|
||||
use alloy_eips::merge::ALLOWED_FUTURE_BLOCK_TIME_SECONDS;
|
||||
use alloy_primitives::U256;
|
||||
use reth_chainspec::{EthChainSpec, EthereumHardforks};
|
||||
use reth_consensus::{
|
||||
@ -192,13 +192,7 @@ where
|
||||
)?;
|
||||
|
||||
// ensure that the blob gas fields for this block
|
||||
if self.chain_spec.is_cancun_active_at_timestamp(header.timestamp()) {
|
||||
let blob_params = if self.chain_spec.is_prague_active_at_timestamp(header.timestamp()) {
|
||||
BlobParams::prague()
|
||||
} else {
|
||||
BlobParams::cancun()
|
||||
};
|
||||
|
||||
if let Some(blob_params) = self.chain_spec.blob_params_at_timestamp(header.timestamp()) {
|
||||
validate_against_parent_4844(header.header(), parent.header(), blob_params)?;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user