You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/starkware-libs/starknet-staking/49)
<!-- Reviewable:end -->
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds a flow test for `update_rewards` with `disable_rewards` across consensus-rewards states, and exposes RewardsManager dispatchers and config helper to support it.
>
> - **Tests (`src/flow_test/test.cairo`)**:
> - Add `update_rewards_disable_rewards_consensus_rewards_flow_test` verifying:
> - No rewards when `disable_rewards` is true (consensus off/on) and panic on same-block re-call.
> - No rewards when `disable_rewards` is false before consensus epoch; rewards after consensus epoch.
> - Uses `StakingError::REWARDS_ALREADY_UPDATED`, `advance_block_number_global`, and expected V3 rewards via `calculate_staker_strk_rewards_with_balances_v3`.
> - Import updates to support new flow (errors, traits, constants).
> - **Test utils (`src/flow_test/utils.cairo`)**:
> - Add RewardsManager dispatchers: `rewards_manager_dispatcher`, `rewards_manager_safe_dispatcher` (interfaces wired in `staking::staking::interface`).
> - Add `set_consensus_rewards_first_epoch(epoch_id)` helper via `IStakingConfigDispatcher`.
> - Add `SystemState::update_rewards(staker, disable_rewards)` convenience wrapper.
> - **Docs (`src/flow_test/flow_ideas.md`)**:
> - Update flow ideas around `disable_rewards` scenarios.
>
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit ff2da76. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
0 commit comments