chore: use native conversions for payload to block (#13608)

This commit is contained in:
Matthias Seitz
2025-01-02 17:20:28 +01:00
committed by GitHub
parent 1b9bdcc253
commit b69c2ebee0
8 changed files with 30 additions and 281 deletions

View File

@ -16,7 +16,6 @@ workspace = true
reth-chainspec.workspace = true
reth-primitives.workspace = true
reth-primitives-traits.workspace = true
reth-rpc-types-compat.workspace = true
# alloy
alloy-rpc-types = { workspace = true, features = ["engine"] }

View File

@ -14,7 +14,6 @@ use alloy_rpc_types::engine::{
use reth_chainspec::EthereumHardforks;
use reth_primitives::{BlockBody, BlockExt, Header, SealedBlock};
use reth_primitives_traits::SignedTransaction;
use reth_rpc_types_compat::engine::payload::try_into_block;
use std::sync::Arc;
/// Execution payload validator.
@ -121,7 +120,7 @@ impl<ChainSpec: EthereumHardforks> ExecutionPayloadValidator<ChainSpec> {
let expected_hash = payload.block_hash();
// First parse the block
let sealed_block = try_into_block(payload, &sidecar)?.seal_slow();
let sealed_block = payload.try_into_block_with_sidecar(&sidecar)?.seal_slow();
// Ensure the hash included in the payload matches the block hash
if expected_hash != sealed_block.hash() {