Merge pull request #589 from Nashatyrev/dev

Silently skip deposits with invalid proof in process_deposit
This commit is contained in:
Danny Ryan 2019-02-09 08:22:38 -07:00 committed by GitHub
commit a712abfb2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1254,13 +1254,16 @@ def process_deposit(state: BeaconState,
Note that this function mutates ``state``.
"""
# Validate the given `proof_of_possession`
assert validate_proof_of_possession(
proof_is_valid = validate_proof_of_possession(
state,
pubkey,
proof_of_possession,
withdrawal_credentials,
)
if not proof_is_valid:
return
validator_pubkeys = [v.pubkey for v in state.validator_registry]
if pubkey not in validator_pubkeys: