mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: add SealedBlock in reth-primitives-traits (#13735)
This commit is contained in:
@ -12,8 +12,8 @@ use alloy_rpc_types::engine::{
|
||||
ExecutionPayload, ExecutionPayloadSidecar, MaybeCancunPayloadFields, PayloadError,
|
||||
};
|
||||
use reth_chainspec::EthereumHardforks;
|
||||
use reth_primitives::{BlockBody, BlockExt, Header, SealedBlock};
|
||||
use reth_primitives_traits::SignedTransaction;
|
||||
use reth_primitives::SealedBlock;
|
||||
use reth_primitives_traits::{Block, SignedTransaction};
|
||||
use std::sync::Arc;
|
||||
|
||||
/// Execution payload validator.
|
||||
@ -59,9 +59,9 @@ impl<ChainSpec: EthereumHardforks> ExecutionPayloadValidator<ChainSpec> {
|
||||
///
|
||||
/// Ensures that the number of blob versioned hashes matches the number hashes included in the
|
||||
/// _separate_ `block_versioned_hashes` of the cancun payload fields.
|
||||
fn ensure_matching_blob_versioned_hashes<T: SignedTransaction>(
|
||||
fn ensure_matching_blob_versioned_hashes<B: Block>(
|
||||
&self,
|
||||
sealed_block: &SealedBlock<Header, BlockBody<T>>,
|
||||
sealed_block: &SealedBlock<B>,
|
||||
cancun_fields: &MaybeCancunPayloadFields,
|
||||
) -> Result<(), PayloadError> {
|
||||
let num_blob_versioned_hashes = sealed_block.blob_versioned_hashes_iter().count();
|
||||
@ -116,7 +116,7 @@ impl<ChainSpec: EthereumHardforks> ExecutionPayloadValidator<ChainSpec> {
|
||||
&self,
|
||||
payload: ExecutionPayload,
|
||||
sidecar: ExecutionPayloadSidecar,
|
||||
) -> Result<SealedBlock<Header, BlockBody<T>>, PayloadError> {
|
||||
) -> Result<SealedBlock<reth_primitives::Block<T>>, PayloadError> {
|
||||
let expected_hash = payload.block_hash();
|
||||
|
||||
// First parse the block
|
||||
|
||||
Reference in New Issue
Block a user