Skip to content
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

pallet-bounties: extends update_due infinitly if BountiesUpdatePeriod… #7723

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

BigTava
Copy link

@BigTava BigTava commented Feb 26, 2025

… is None

Description

Fixes polkadot-fellows/runtimes#509

Integration

Remove BountyUpdatePeriod

Review Notes

Modifies how bounty expiry is handled

🔍 Code Diff Summary
- #[pallet::constant]
- type BountyUpdatePeriod: Get<BlockNumberFor<Self, I>>;
+ #[pallet::constant]
+ type BountyUpdatePeriod: Get<Option<BlockNumberFor<Self, I>>>;

- *update_due = (Self::treasury_block_number() + T::BountyUpdatePeriod::get()).max(*update_due);
+ *update_due = Self::treasury_block_number().saturating_add(
+     T::BountyUpdatePeriod::get().unwrap_or(BlockNumberFor::<T, I>::MAX)
+ ); 

Checklist

  • My PR includes a detailed description as outlined in the "Description" and its two subsections above.
  • My PR follows the labeling requirements of this project (at minimum one label for T required)
    • External contributors: ask maintainers to put the right label on your PR.
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@BigTava BigTava requested a review from a team as a code owner February 26, 2025 10:41
@BigTava BigTava added the T2-pallets This PR/Issue is related to a particular pallet. label Feb 26, 2025
@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/13550346591
Failed job name: test-linux-stable-runtime-benchmarks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T2-pallets This PR/Issue is related to a particular pallet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove Bounty Expiry from Bounties Pallet
1 participant