mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: update revm 19 alloy 09 (#13594)
This commit is contained in:
@ -10,6 +10,7 @@
|
||||
#![cfg(feature = "optimism")]
|
||||
|
||||
use alloy_consensus::{BlockHeader, Header, EMPTY_OMMER_ROOT_HASH};
|
||||
use alloy_eips::eip7840::BlobParams;
|
||||
use alloy_primitives::{B64, U256};
|
||||
use reth_chainspec::EthereumHardforks;
|
||||
use reth_consensus::{
|
||||
@ -142,7 +143,7 @@ impl HeaderValidator for OpBeaconConsensus {
|
||||
|
||||
// ensure that the blob gas fields for this block
|
||||
if self.chain_spec.is_cancun_active_at_timestamp(header.timestamp) {
|
||||
validate_against_parent_4844(header.header(), parent.header())?;
|
||||
validate_against_parent_4844(header.header(), parent.header(), BlobParams::cancun())?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
@ -35,9 +35,9 @@ pub fn validate_block_post_execution(
|
||||
// Check if gas used matches the value set in header.
|
||||
let cumulative_gas_used =
|
||||
receipts.last().map(|receipt| receipt.cumulative_gas_used()).unwrap_or(0);
|
||||
if block.gas_used as u128 != cumulative_gas_used {
|
||||
if block.gas_used != cumulative_gas_used {
|
||||
return Err(ConsensusError::BlockGasUsed {
|
||||
gas: GotExpected { got: cumulative_gas_used as u64, expected: block.gas_used },
|
||||
gas: GotExpected { got: cumulative_gas_used, expected: block.gas_used },
|
||||
gas_spent_by_tx: gas_spent_by_transactions(receipts),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user