mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 10:11:44 +00:00
BeaconState and BeaconBlockBody mods
This commit is contained in:
@@ -307,6 +307,7 @@ impl<E: EthSpec> Operation<E> for BeaconBlockBody<E, FullPayload<E>> {
|
||||
ForkName::Deneb => BeaconBlockBody::Deneb(<_>::from_ssz_bytes(bytes)?),
|
||||
ForkName::Electra => BeaconBlockBody::Electra(<_>::from_ssz_bytes(bytes)?),
|
||||
ForkName::Fulu => BeaconBlockBody::Fulu(<_>::from_ssz_bytes(bytes)?),
|
||||
// TODO(EIP-7732): See if we need to handle Gloas here
|
||||
_ => panic!(),
|
||||
})
|
||||
})
|
||||
@@ -366,6 +367,7 @@ impl<E: EthSpec> Operation<E> for BeaconBlockBody<E, BlindedPayload<E>> {
|
||||
let inner = <BeaconBlockBodyFulu<E, FullPayload<E>>>::from_ssz_bytes(bytes)?;
|
||||
BeaconBlockBody::Fulu(inner.clone_as_blinded())
|
||||
}
|
||||
// TODO(EIP-7732): See if we need to handle Gloas here
|
||||
_ => panic!(),
|
||||
})
|
||||
})
|
||||
@@ -417,7 +419,15 @@ impl<E: EthSpec> Operation<E> for WithdrawalsPayload<E> {
|
||||
spec: &ChainSpec,
|
||||
_: &Operations<E, Self>,
|
||||
) -> Result<(), BlockProcessingError> {
|
||||
process_withdrawals::<_, FullPayload<_>>(state, self.payload.to_ref(), spec)
|
||||
if state.fork_name_unchecked().gloas_enabled() {
|
||||
process_withdrawals::gloas::process_withdrawals(state, spec)
|
||||
} else {
|
||||
process_withdrawals::capella::process_withdrawals::<_, FullPayload<_>>(
|
||||
state,
|
||||
self.payload.to_ref(),
|
||||
spec,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user