mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
refactor: simplify withdrawals outcome (#12780)
This commit is contained in:
@ -14,7 +14,7 @@ use alloy_eips::{eip4844::MAX_DATA_GAS_PER_BLOCK, eip7685::Requests, merge::BEAC
|
||||
use alloy_primitives::U256;
|
||||
use reth_basic_payload_builder::{
|
||||
commit_withdrawals, is_better_payload, BuildArguments, BuildOutcome, PayloadBuilder,
|
||||
PayloadConfig, WithdrawalsOutcome,
|
||||
PayloadConfig,
|
||||
};
|
||||
use reth_chain_state::ExecutedBlock;
|
||||
use reth_chainspec::ChainSpec;
|
||||
@ -356,8 +356,8 @@ where
|
||||
None
|
||||
};
|
||||
|
||||
let WithdrawalsOutcome { withdrawals_root, withdrawals } =
|
||||
commit_withdrawals(&mut db, &chain_spec, attributes.timestamp, attributes.withdrawals)?;
|
||||
let withdrawals_root =
|
||||
commit_withdrawals(&mut db, &chain_spec, attributes.timestamp, &attributes.withdrawals)?;
|
||||
|
||||
// merge all transitions into bundle state, this would apply the withdrawal balance changes
|
||||
// and 4788 contract call
|
||||
@ -443,7 +443,11 @@ where
|
||||
// seal the block
|
||||
let block = Block {
|
||||
header,
|
||||
body: BlockBody { transactions: executed_txs, ommers: vec![], withdrawals },
|
||||
body: BlockBody {
|
||||
transactions: executed_txs,
|
||||
ommers: vec![],
|
||||
withdrawals: Some(attributes.withdrawals.clone()),
|
||||
},
|
||||
};
|
||||
|
||||
let sealed_block = Arc::new(block.seal_slow());
|
||||
|
||||
Reference in New Issue
Block a user