mirror of
https://github.com/ethereum/consensus-specs.git
synced 2026-02-02 01:25:16 -05:00
ensure rewards are tested properly post altair fork
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user