mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-12 11:44:41 +00:00
ensure rewards are tested properly post altair fork
This commit is contained in:
parent
e2abdb74ae
commit
37c49ffcdc
@ -50,6 +50,18 @@ def validate_resulting_balances(spec, pre_state, post_state, attestations):
|
||||
assert post_state.balances[index] > pre_state.balances[index]
|
||||
else:
|
||||
assert post_state.balances[index] < pre_state.balances[index]
|
||||
else:
|
||||
if spec.is_in_inactivity_leak(post_state):
|
||||
if index in attesting_indices:
|
||||
# If not proposer but participated optimally, should have exactly neutral balance
|
||||
assert post_state.balances[index] == pre_state.balances[index]
|
||||
else:
|
||||
assert post_state.balances[index] < pre_state.balances[index]
|
||||
else:
|
||||
if index in attesting_indices:
|
||||
assert post_state.balances[index] > pre_state.balances[index]
|
||||
else:
|
||||
assert post_state.balances[index] < pre_state.balances[index]
|
||||
|
||||
|
||||
@with_all_phases
|
||||
|
Loading…
x
Reference in New Issue
Block a user