-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 sbf sysvar test #32803
fix sbf sysvar test #32803
Conversation
Codecov Report
@@ Coverage Diff @@
## master #32803 +/- ##
=======================================
Coverage 82.0% 82.0%
=======================================
Files 785 785
Lines 211736 211736
=======================================
+ Hits 173643 173657 +14
+ Misses 38093 38079 -14 |
Test passed.
|
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.
lgtm. It looks like the no-rewards logic is tested in get_epoch_rewards_sysvar so that's covered too
@HaoranYi can this be merged? |
yolo |
* fix sbf sysvar test * typo --------- Co-authored-by: HaoranYi <[email protected]>
Thanks for merging it. |
Problem
when running sbf program, sbf loader will use runtime sysvar cache to load
sysvar. Therefore, the program will return unsupported sysvar error if the
sysvar doesn't exist in the cache. For normal sysvar, this is not a problem
because the sysvar always exists for every bank. However, for
epoch_rewards
sysvar, the situation is different.
epoch_rewards
sysvar only exists duringthe epoch reward period. Therefore, the current
program_test
framework, bydefault, doesn't support
epoch_rewards
sysvar.Summary of Changes
program_test
to allow mock sysvar.Fixes #