Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Commit

Permalink
🧹
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Oct 17, 2023
1 parent 3ce4b83 commit 067576c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions crates/payload/builder/src/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,20 +156,20 @@ impl PayloadBuilderAttributes {
///
/// Derives the unique [PayloadId] for the given parent and attributes
pub fn try_new(parent: B256, attributes: PayloadAttributes) -> Result<Self, DecodeError> {
#[cfg(feature = "optimism")]
let transactions = attributes
.transactions
.as_ref()
.unwrap_or(&Vec::default())
.iter()
.map(|tx| TransactionSigned::decode_enveloped(tx.clone()))
.collect::<Result<_, _>>()?;

#[cfg(not(feature = "optimism"))]
let id = payload_id(&parent, &attributes);

#[cfg(feature = "optimism")]
let id = payload_id(&parent, &attributes, &transactions);
let (transactions, id) = (
attributes
.transactions
.as_ref()
.unwrap_or(&Vec::default())
.iter()
.map(|tx| TransactionSigned::decode_enveloped(tx.clone()))
.collect::<Result<_, _>>()?,
payload_id(&parent, &attributes, &transactions),
);

let withdraw = attributes.withdrawals.map(
|withdrawals: Vec<reth_rpc_types::engine::payload::Withdrawal>| {
Expand Down

0 comments on commit 067576c

Please sign in to comment.