mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
primitives: rm revm-primitives reexport (#11193)
This commit is contained in:
@ -30,6 +30,7 @@ reth-chainspec.workspace = true
|
||||
|
||||
# ethereum
|
||||
revm.workspace = true
|
||||
revm-primitives.workspace = true
|
||||
|
||||
# alloy
|
||||
alloy-primitives.workspace = true
|
||||
|
||||
@ -31,7 +31,6 @@ use reth_payload_builder::{EthBuiltPayload, EthPayloadBuilderAttributes};
|
||||
use reth_payload_primitives::{PayloadBuilderAttributes, PayloadBuilderError};
|
||||
use reth_primitives::{
|
||||
constants::{eip4844::MAX_DATA_GAS_PER_BLOCK, BEACON_NONCE},
|
||||
eip4844::calculate_excess_blob_gas,
|
||||
proofs::{self, calculate_requests_root},
|
||||
revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg},
|
||||
Block, BlockBody, EthereumHardforks, Header, IntoRecoveredTransaction, Receipt,
|
||||
@ -48,6 +47,7 @@ use revm::{
|
||||
primitives::{EVMError, EnvWithHandlerCfg, InvalidTransaction, ResultAndState},
|
||||
DatabaseCommit, State,
|
||||
};
|
||||
use revm_primitives::calc_excess_blob_gas;
|
||||
use std::sync::Arc;
|
||||
use tracing::{debug, trace, warn};
|
||||
|
||||
@ -391,14 +391,11 @@ where
|
||||
excess_blob_gas = if chain_spec.is_cancun_active_at_timestamp(parent_block.timestamp) {
|
||||
let parent_excess_blob_gas = parent_block.excess_blob_gas.unwrap_or_default();
|
||||
let parent_blob_gas_used = parent_block.blob_gas_used.unwrap_or_default();
|
||||
Some(calculate_excess_blob_gas(
|
||||
parent_excess_blob_gas as u64,
|
||||
parent_blob_gas_used as u64,
|
||||
))
|
||||
Some(calc_excess_blob_gas(parent_excess_blob_gas as u64, parent_blob_gas_used as u64))
|
||||
} else {
|
||||
// for the first post-fork block, both parent.blob_gas_used and
|
||||
// parent.excess_blob_gas are evaluated as 0
|
||||
Some(calculate_excess_blob_gas(0, 0))
|
||||
Some(calc_excess_blob_gas(0, 0))
|
||||
};
|
||||
|
||||
blob_gas_used = Some(sum_blob_gas_used);
|
||||
|
||||
Reference in New Issue
Block a user