From be147d4247201262ea29e35ecc11e238cd7244b2 Mon Sep 17 00:00:00 2001 From: Federico Gimenez Date: Sun, 24 Nov 2024 10:57:44 +0100 Subject: [PATCH] chore(payload): fix withdrawals field pre-shanghai in Ethereum payload --- crates/ethereum/payload/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/ethereum/payload/src/lib.rs b/crates/ethereum/payload/src/lib.rs index f38c93613dc8..0a714f149147 100644 --- a/crates/ethereum/payload/src/lib.rs +++ b/crates/ethereum/payload/src/lib.rs @@ -440,14 +440,14 @@ where requests_hash, }; + let withdrawals = chain_spec + .is_shanghai_active_at_timestamp(attributes.timestamp) + .then(|| attributes.withdrawals.clone()); + // seal the block let block = Block { header, - body: BlockBody { - transactions: executed_txs, - ommers: vec![], - withdrawals: Some(attributes.withdrawals.clone()), - }, + body: BlockBody { transactions: executed_txs, ommers: vec![], withdrawals }, }; let sealed_block = Arc::new(block.seal_slow());