Epoch-based proposer slashing

See #675 item 25.
This commit is contained in:
Justin 2019-03-12 12:24:37 +00:00 committed by GitHub
parent 8ca303efc5
commit 64ba3a3107
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2306,7 +2306,7 @@ def process_proposer_slashing(state: BeaconState,
"""
proposer = state.validator_registry[proposer_slashing.proposer_index]
# Verify that the slot is the same
assert proposer_slashing.header_1.slot == proposer_slashing.header_2.slot
assert slot_to_epoch(proposer_slashing.header_1.slot) == slot_to_epoch(proposer_slashing.header_2.slot)
# But the headers are different
assert proposer_slashing.header_1 != proposer_slashing.header_2
# Proposer is not yet slashed