Update 0_beacon-chain.md

This commit is contained in:
Justin 2019-03-19 11:12:50 +00:00 committed by GitHub
parent 0c383ce4a1
commit e91036cfc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -2328,7 +2328,7 @@ def process_proposer_slashing(state: BeaconState,
# But the headers are different # But the headers are different
assert proposer_slashing.header_1 != proposer_slashing.header_2 assert proposer_slashing.header_1 != proposer_slashing.header_2
# Check proposer is slashable # Check proposer is slashable
assert is_slashable_validator(proposer) assert is_slashable_validator(proposer, get_current_epoch(state))
# Signatures are valid # Signatures are valid
for header in (proposer_slashing.header_1, proposer_slashing.header_2): for header in (proposer_slashing.header_1, proposer_slashing.header_2):
assert bls_verify( assert bls_verify(
@ -2367,7 +2367,7 @@ def process_attester_slashing(state: BeaconState,
index for index in attestation1.validator_indices index for index in attestation1.validator_indices
if ( if (
index in attestation2.validator_indices and index in attestation2.validator_indices and
is_slashable_validator(state.validator_registry[index]) is_slashable_validator(state.validator_registry[index], get_current_epoch(state))
) )
] ]
assert len(slashable_indices) >= 1 assert len(slashable_indices) >= 1