mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-14 20:54:27 +00:00
Merge pull request #762 from ethereum/JustinDrake-patch-10
Epoch-based proposer slashing
This commit is contained in:
commit
a4a1763e98
@ -2305,8 +2305,8 @@ def process_proposer_slashing(state: BeaconState,
|
|||||||
Note that this function mutates ``state``.
|
Note that this function mutates ``state``.
|
||||||
"""
|
"""
|
||||||
proposer = state.validator_registry[proposer_slashing.proposer_index]
|
proposer = state.validator_registry[proposer_slashing.proposer_index]
|
||||||
# Verify that the slot is the same
|
# Verify that the epoch 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
|
# But the headers are different
|
||||||
assert proposer_slashing.header_1 != proposer_slashing.header_2
|
assert proposer_slashing.header_1 != proposer_slashing.header_2
|
||||||
# Proposer is not yet slashed
|
# Proposer is not yet slashed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user