Remove receipts fn in BuiltPayload (#10772)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
malik
2024-09-09 14:41:50 +01:00
committed by GitHub
parent 4cbdc7c125
commit 1ea8ccaa21
7 changed files with 9 additions and 58 deletions

View File

@ -7,7 +7,7 @@ use reth_evm_ethereum::revm_spec_by_timestamp_after_merge;
use reth_payload_primitives::{BuiltPayload, PayloadBuilderAttributes};
use reth_primitives::{
constants::EIP1559_INITIAL_BASE_FEE, Address, BlobTransactionSidecar, EthereumHardfork, Header,
Receipt, SealedBlock, Withdrawals, B256, U256,
SealedBlock, Withdrawals, B256, U256,
};
use reth_rpc_types::engine::{
ExecutionPayloadEnvelopeV2, ExecutionPayloadEnvelopeV3, ExecutionPayloadEnvelopeV4,
@ -38,8 +38,6 @@ pub struct EthBuiltPayload {
/// The blobs, proofs, and commitments in the block. If the block is pre-cancun, this will be
/// empty.
pub(crate) sidecars: Vec<BlobTransactionSidecar>,
/// The receipts of the block
pub(crate) receipts: Vec<Receipt>,
}
// === impl BuiltPayload ===
@ -50,10 +48,9 @@ impl EthBuiltPayload {
id: PayloadId,
block: SealedBlock,
fees: U256,
receipts: Vec<Receipt>,
executed_block: Option<ExecutedBlock>,
) -> Self {
Self { id, block, executed_block, fees, sidecars: Vec::new(), receipts }
Self { id, block, executed_block, fees, sidecars: Vec::new() }
}
/// Returns the identifier of the payload.
@ -94,10 +91,6 @@ impl BuiltPayload for EthBuiltPayload {
fn executed_block(&self) -> Option<ExecutedBlock> {
self.executed_block.clone()
}
fn receipts(&self) -> &[Receipt] {
&self.receipts
}
}
impl<'a> BuiltPayload for &'a EthBuiltPayload {
@ -112,10 +105,6 @@ impl<'a> BuiltPayload for &'a EthBuiltPayload {
fn executed_block(&self) -> Option<ExecutedBlock> {
self.executed_block.clone()
}
fn receipts(&self) -> &[Receipt] {
&self.receipts
}
}
// V1 engine_getPayloadV1 response