Skip to content

Commit

Permalink
fix: pop consolidation requests in payload builder
Browse files Browse the repository at this point in the history
  • Loading branch information
onbjerg committed Aug 28, 2024
1 parent 85ef1fb commit 62eec7b
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions crates/ethereum/payload/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,21 @@ where
// We do not calculate the EIP-6110 deposit requests because there are no
// transactions in an empty payload.
let withdrawal_requests = post_block_withdrawal_requests_contract_call(
&self.evm_config,
&evm_config,
&mut db,
&initialized_cfg,
&initialized_block_env,
)
.map_err(|err| PayloadBuilderError::Internal(err.into()))?;
let consolidation_requests = post_block_consolidation_requests_contract_call(
&evm_config,
&mut db,
&initialized_cfg,
&initialized_block_env,
)
.map_err(|err| PayloadBuilderError::Internal(err.into()))?;

let requests = withdrawal_requests;
let requests = [withdrawal_requests, consolidation_requests].concat();
let requests_root = calculate_requests_root(&requests);
(Some(requests.into()), Some(requests_root))
} else {
Expand Down Expand Up @@ -454,8 +461,15 @@ where
&initialized_block_env,
)
.map_err(|err| PayloadBuilderError::Internal(err.into()))?;
let consolidation_requests = post_block_consolidation_requests_contract_call(
&evm_config,
&mut db,
&initialized_cfg,
&initialized_block_env,
)
.map_err(|err| PayloadBuilderError::Internal(err.into()))?;

let requests = [deposit_requests, withdrawal_requests].concat();
let requests = [deposit_requests, withdrawal_requests, consolidation_requests].concat();
let requests_root = calculate_requests_root(&requests);
(Some(requests.into()), Some(requests_root))
} else {
Expand Down

0 comments on commit 62eec7b

Please sign in to comment.