Closed Yaroms closed 1 month ago
[!CAUTION]
Review failed
The pull request is closed.
The recent changes to the dual staking module introduce a shift in the time frames used for evaluating delegation rewards. The logic now focuses on a one-week period instead of one month, enabling delegates to qualify for rewards more quickly. This adjustment impacts the reward calculations and the relevant methods in the code, reflecting an evolution in the delegation feature set.
File/Path | Change Summary |
---|---|
x/dualstaking/keeper/delegator_reward.go |
Updated RewardProvidersAndDelegators to filter delegations based on a one-week timeframe. |
x/dualstaking/types/delegate.go |
Renamed IsFirstMonthPassed to IsFirstWeekPassed and modified logic to check one week. |
x/pairing/keeper/delegator_rewards_test.go |
Adjusted TestProviderRewardWithCommission to reflect the one-week eligibility check. |
sequenceDiagram
participant Delegator
participant Keeper
participant RewardCalculator
Delegator->>Keeper: Submit Delegation
Keeper->>RewardCalculator: Check Delegation Eligibility (1 week)
RewardCalculator-->>Keeper: Eligibility confirmed
Keeper->>Delegator: Distribute Rewards
π° "In a week, the bunnies hop,
Rewards are here, they never stop!
No more waiting for a monthβs delay,
Quick rewards make us dance and play!
With each leap, our fortunes grow,
Hooray for changes, let the good times flow!" π₯
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
2β061 testsβ Β±0βββ2β061 :white_check_mark: Β±0βββ24m 28s :stopwatch: - 1m 6s ββ141 suites Β±0βββββββ0 :zzz: Β±0β ββββ7 filesββ Β±0βββββββ0 :x: Β±0β
Results for commit 5bbeb90a.βΒ± Comparison against base commit 0fe0e9c9.
Description
Closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changemain
branchReviewers Checklist
All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.
I have...
Summary by CodeRabbit
New Features
Bug Fixes