mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-13 20:24:22 +00:00
Shard receipts cannot penalize withdrawn validators
This commit is contained in:
parent
7132778a69
commit
36a2283052
@ -156,6 +156,7 @@ def process_shard_receipt(state: BeaconState, receipt_proof: ShardReceiptProof):
|
||||
root=state.current_crosslinks[shard].data_root
|
||||
)
|
||||
for delta in receipt_proof.receipt:
|
||||
if get_current_epoch(state) < state.validators[delta.index].withdrawable_epoch:
|
||||
increase_balance(state, delta.index, state.validators[delta.index].effective_balance * delta.reward_coefficient // REWARD_COEFFICIENT_BASE)
|
||||
decrease_balance(state, delta.index, delta.block_fee)
|
||||
state.next_shard_receipt_period[receipt_proof.shard] += 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user