process_withdrawals()

This commit is contained in:
Mark Mackey
2024-09-24 15:47:06 -05:00
parent 559ea055c2
commit e0b8c8e7eb
3 changed files with 124 additions and 75 deletions

View File

@@ -420,7 +420,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().eip7732_enabled() {
process_withdrawals::eip7732::process_withdrawals(state, spec)
} else {
process_withdrawals::capella::process_withdrawals::<_, FullPayload<_>>(
state,
self.payload.to_ref(),
spec,
)
}
}
}