fix: gracefully handle missing persisted_trie_updates (#13942)

This commit is contained in:
Arsenii Kulikov
2025-01-27 18:02:53 +04:00
committed by GitHub
parent b9a6e65d8c
commit 33bf34b2fb
15 changed files with 249 additions and 162 deletions

View File

@ -6,7 +6,7 @@ use crate::{
};
use alloy_primitives::U256;
use reth_chain_state::{CanonStateNotification, ExecutedBlock};
use reth_chain_state::{CanonStateNotification, ExecutedBlockWithTrieUpdates};
use reth_payload_builder_primitives::PayloadBuilderError;
use reth_payload_primitives::{PayloadKind, PayloadTypes};
use reth_primitives::Block;
@ -90,7 +90,7 @@ impl PayloadJob for TestPayloadJob {
self.attr.payload_id(),
Arc::new(Block::default().seal_slow()),
U256::ZERO,
Some(ExecutedBlock::default()),
Some(ExecutedBlockWithTrieUpdates::default()),
Some(Default::default()),
))
}

View File

@ -6,7 +6,7 @@ use alloy_eips::{
use alloy_primitives::{Address, B256, U256};
use alloy_rpc_types_engine::{PayloadAttributes as EthPayloadAttributes, PayloadId};
use core::fmt;
use reth_chain_state::ExecutedBlock;
use reth_chain_state::ExecutedBlockWithTrieUpdates;
use reth_primitives::{NodePrimitives, SealedBlock};
/// Represents a built payload type that contains a built `SealedBlock` and can be converted into
@ -22,7 +22,7 @@ pub trait BuiltPayload: Send + Sync + fmt::Debug {
fn fees(&self) -> U256;
/// Returns the entire execution data for the built block, if available.
fn executed_block(&self) -> Option<ExecutedBlock<Self::Primitives>> {
fn executed_block(&self) -> Option<ExecutedBlockWithTrieUpdates<Self::Primitives>> {
None
}