refactor: change PayloadConfig to use parent header instead of parent block (#12159)

This commit is contained in:
Léa Narzis
2024-10-29 16:52:00 +07:00
committed by GitHub
parent b48fa68f65
commit 7880d4ddb0
6 changed files with 47 additions and 39 deletions

View File

@ -29,7 +29,8 @@ use reth_node_ethereum::{EthEvmConfig, EthExecutorProvider};
use reth_payload_builder::database::CachedReads;
use reth_primitives::{
revm_primitives::KzgSettings, BlobTransaction, BlobTransactionSidecar,
PooledTransactionsElement, SealedBlock, SealedBlockWithSenders, Transaction, TransactionSigned,
PooledTransactionsElement, SealedBlock, SealedBlockWithSenders, SealedHeader, Transaction,
TransactionSigned,
};
use reth_provider::{
providers::BlockchainProvider, BlockHashReader, BlockReader, BlockWriter, ChainSpecProvider,
@ -224,7 +225,7 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
withdrawals: None,
};
let payload_config = PayloadConfig::new(
Arc::clone(&best_block),
Arc::new(SealedHeader::new(best_block.header().clone(), best_block.hash())),
Bytes::default(),
reth_payload_builder::EthPayloadBuilderAttributes::try_new(
best_block.hash(),