-
Notifications
You must be signed in to change notification settings - Fork 983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix electra tests and enable testgen #3681
Conversation
…xpected value for post-electra
if is_post_electra(spec): | ||
assert state.pending_balance_deposits[0].amount == amount | ||
assert state.pending_balance_deposits[0].index == validator_index | ||
else: | ||
# Since withdrawals happen before deposits, it becomes partially withdrawable after state transition. | ||
validator = state.validators[validator_index] | ||
balance = state.balances[validator_index] | ||
assert spec.is_partially_withdrawable_validator(validator, balance) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the mainnet preset, it had an error because the top-up got withdrawn during the block processing. I reverted the previous fix and added different expected results; it just checks if the top-up has been appended into pending_balance_deposits
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, sorry about that! this looks good for now, ill make a note to revisit if there is a better way to make this test forward-compatible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great! nice work :)
No description provided.