mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 19:51:47 +00:00
Massive Update to Engine API (#3740)
* Massive Update to Engine API * Update beacon_node/execution_layer/src/engine_api/json_structures.rs Co-authored-by: Michael Sproul <micsproul@gmail.com> * Update beacon_node/execution_layer/src/engine_api/json_structures.rs Co-authored-by: Michael Sproul <micsproul@gmail.com> * Update beacon_node/beacon_chain/src/execution_payload.rs Co-authored-by: realbigsean <seananderson33@GMAIL.com> * Update beacon_node/execution_layer/src/engine_api.rs Co-authored-by: realbigsean <seananderson33@GMAIL.com> Co-authored-by: Michael Sproul <micsproul@gmail.com> Co-authored-by: realbigsean <seananderson33@GMAIL.com>
This commit is contained in:
@@ -462,7 +462,7 @@ pub fn compute_timestamp_at_slot<T: EthSpec>(
|
||||
}
|
||||
|
||||
/// FIXME: add link to this function once the spec is stable
|
||||
#[cfg(all(feature = "withdrawals", feature = "withdrawals-processing"))]
|
||||
#[cfg(feature = "withdrawals")]
|
||||
pub fn get_expected_withdrawals<T: EthSpec>(
|
||||
state: &BeaconState<T>,
|
||||
spec: &ChainSpec,
|
||||
@@ -472,6 +472,10 @@ pub fn get_expected_withdrawals<T: EthSpec>(
|
||||
let mut validator_index = state.next_withdrawal_validator_index()?;
|
||||
let mut withdrawals = vec![];
|
||||
|
||||
if cfg!(not(feature = "withdrawals-processing")) {
|
||||
return Ok(withdrawals.into());
|
||||
}
|
||||
|
||||
for _ in 0..state.validators().len() {
|
||||
let validator = state.get_validator(validator_index as usize)?;
|
||||
let balance = *state.balances().get(validator_index as usize).ok_or(
|
||||
|
||||
Reference in New Issue
Block a user