chore(payload): fix withdrawals field pre-shanghai in Ethereum payload (#12828)

This commit is contained in:
Federico Gimenez
2024-11-24 11:28:31 +01:00
committed by GitHub
parent 21bc75df39
commit e020eb71bd

View File

@ -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());