Bugfix: fix an incorrect balance increase during genesis state generation

This commit is contained in:
Zahary Karadjov 2020-11-24 23:29:52 +02:00
parent 594ef713a0
commit a995cdd3d9
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
1 changed files with 1 additions and 1 deletions

View File

@ -284,9 +284,9 @@ proc initialize_beacon_state_from_eth1*(
do:
if skipBlsValidation in flags or
verify_deposit_signature(preset, deposit):
pubkeyToIndex[pubkey] = state.validators.len
state.validators.add(get_validator_from_deposit(state[], deposit))
state.balances.add(amount)
pubkeyToIndex[pubkey] = idx
else:
# Invalid deposits are perfectly possible
trace "Skipping deposit with invalid signature",