mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Fix
This commit is contained in:
@@ -367,9 +367,18 @@ pub fn get_execution_payload<T: BeaconChainTypes>(
|
|||||||
let timestamp =
|
let timestamp =
|
||||||
compute_timestamp_at_slot(state, state.slot(), spec).map_err(BeaconStateError::from)?;
|
compute_timestamp_at_slot(state, state.slot(), spec).map_err(BeaconStateError::from)?;
|
||||||
let random = *state.get_randao_mix(current_epoch)?;
|
let random = *state.get_randao_mix(current_epoch)?;
|
||||||
let latest_execution_payload_header = state.latest_execution_payload_header()?;
|
// In GLOAS (ePBS), the execution payload header is replaced by
|
||||||
let latest_execution_payload_header_block_hash = latest_execution_payload_header.block_hash();
|
// `latest_block_hash` and `latest_execution_payload_bid`.
|
||||||
let latest_execution_payload_header_gas_limit = latest_execution_payload_header.gas_limit();
|
let (latest_execution_payload_header_block_hash, latest_execution_payload_header_gas_limit) =
|
||||||
|
if state.fork_name_unchecked() == ForkName::Gloas {
|
||||||
|
(
|
||||||
|
*state.latest_block_hash()?,
|
||||||
|
state.latest_execution_payload_bid()?.gas_limit,
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
let header = state.latest_execution_payload_header()?;
|
||||||
|
(header.block_hash(), header.gas_limit())
|
||||||
|
};
|
||||||
let withdrawals = if state.fork_name_unchecked().capella_enabled() {
|
let withdrawals = if state.fork_name_unchecked().capella_enabled() {
|
||||||
Some(Withdrawals::<T::EthSpec>::from(get_expected_withdrawals(state, spec)?).into())
|
Some(Withdrawals::<T::EthSpec>::from(get_expected_withdrawals(state, spec)?).into())
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user