Skip to content

Commit

Permalink
Check EpochRewards::active within the Stake Program (#617)
Browse files Browse the repository at this point in the history
* Add new StakeError variant

* Add closure to return error if EpochRewards::active

* Use error_during_epoch_rewards for Instructions that mutate stake accounts

* Use try instead of manually matching Ok/Err

* Consolidate error_during_epoch_rewards check

* Add new test helper

* Add test demonstrating which ix return StakeError::EpochRewardsActive

* Remove single-use fn
  • Loading branch information
CriesofCarrots authored Apr 9, 2024
1 parent 1744e9e commit 2470b45
Show file tree
Hide file tree
Showing 2 changed files with 235 additions and 26 deletions.
Loading

0 comments on commit 2470b45

Please sign in to comment.