Update get_expected_withdrawals to return processed_validators_sweep_count.

This commit is contained in:
Jimmy Chen
2026-01-20 16:25:24 +11:00
parent b403504aaa
commit 5c8acea305
6 changed files with 87 additions and 61 deletions

View File

@@ -4794,7 +4794,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(|(withdrawals, _, _, _)| withdrawals)
.map_err(Error::PrepareProposerFailed);
}
@@ -4812,7 +4812,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
&self.spec,
)?;
get_expected_withdrawals(&advanced_state, &self.spec)
.map(|(withdrawals, _, _)| withdrawals)
.map(|(withdrawals, _, _, _)| withdrawals)
.map_err(Error::PrepareProposerFailed)
}

View File

@@ -32,7 +32,7 @@ pub fn get_next_withdrawals<T: BeaconChainTypes>(
}
match get_expected_withdrawals(&state, &chain.spec) {
Ok((withdrawals, _, _)) => Ok(withdrawals),
Ok((withdrawals, _, _, _)) => Ok(withdrawals),
Err(e) => Err(warp_utils::reject::custom_server_error(format!(
"failed to get expected withdrawal: {:?}",
e