mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-16 03:12:41 +00:00
Make add_validator_to_registry more in line with the spec
This commit is contained in:
@@ -470,7 +470,16 @@ pub fn apply_deposit<E: EthSpec>(
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
state.add_validator_to_registry(&deposit_data, spec)?;
|
||||
state.add_validator_to_registry(
|
||||
deposit_data.pubkey,
|
||||
deposit_data.withdrawal_credentials,
|
||||
if state.fork_name_unchecked() >= ForkName::Electra {
|
||||
0
|
||||
} else {
|
||||
amount
|
||||
},
|
||||
spec,
|
||||
)?;
|
||||
|
||||
// [New in Electra:EIP7251]
|
||||
if let Ok(pending_deposits) = state.pending_deposits_mut() {
|
||||
|
||||
Reference in New Issue
Block a user