mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-18 13:28:33 +00:00
Implement Gloas withdrawals and refactor (#8692)
Co-Authored-By: Michael Sproul <michael@sigmaprime.io> Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
This commit is contained in:
@@ -4889,7 +4889,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
let proposal_epoch = proposal_slot.epoch(T::EthSpec::slots_per_epoch());
|
||||
if head_state.current_epoch() == proposal_epoch {
|
||||
return get_expected_withdrawals(&unadvanced_state, &self.spec)
|
||||
.map(|(withdrawals, _)| withdrawals)
|
||||
.map(Into::into)
|
||||
.map_err(Error::PrepareProposerFailed);
|
||||
}
|
||||
|
||||
@@ -4907,7 +4907,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
&self.spec,
|
||||
)?;
|
||||
get_expected_withdrawals(&advanced_state, &self.spec)
|
||||
.map(|(withdrawals, _)| withdrawals)
|
||||
.map(Into::into)
|
||||
.map_err(Error::PrepareProposerFailed)
|
||||
}
|
||||
|
||||
|
||||
@@ -371,7 +371,7 @@ pub fn get_execution_payload<T: BeaconChainTypes>(
|
||||
let latest_execution_payload_header_block_hash = latest_execution_payload_header.block_hash();
|
||||
let latest_execution_payload_header_gas_limit = latest_execution_payload_header.gas_limit();
|
||||
let withdrawals = if state.fork_name_unchecked().capella_enabled() {
|
||||
Some(get_expected_withdrawals(state, spec)?.0.into())
|
||||
Some(Withdrawals::<T::EthSpec>::from(get_expected_withdrawals(state, spec)?).into())
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user