mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-22 06:14:38 +00:00
process withdrawals updates
This commit is contained in:
@@ -4435,6 +4435,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_err(Error::PrepareProposerFailed);
|
||||
}
|
||||
|
||||
@@ -4452,7 +4453,9 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
proposal_epoch.start_slot(T::EthSpec::slots_per_epoch()),
|
||||
&self.spec,
|
||||
)?;
|
||||
get_expected_withdrawals(&advanced_state, &self.spec).map_err(Error::PrepareProposerFailed)
|
||||
get_expected_withdrawals(&advanced_state, &self.spec)
|
||||
.map(|(withdrawals, _)| withdrawals)
|
||||
.map_err(Error::PrepareProposerFailed)
|
||||
}
|
||||
|
||||
/// Determine whether a fork choice update to the execution layer should be overridden.
|
||||
|
||||
@@ -413,7 +413,7 @@ pub fn get_execution_payload<T: BeaconChainTypes>(
|
||||
state.latest_execution_payload_header()?.block_hash();
|
||||
let withdrawals = match state {
|
||||
&BeaconState::Capella(_) | &BeaconState::Deneb(_) | &BeaconState::Electra(_) => {
|
||||
Some(get_expected_withdrawals(state, spec)?.into())
|
||||
Some(get_expected_withdrawals(state, spec)?.0.into())
|
||||
}
|
||||
&BeaconState::Bellatrix(_) => None,
|
||||
// These shouldn't happen but they're here to make the pattern irrefutable
|
||||
|
||||
Reference in New Issue
Block a user