Skip to content

fixed max child bounties count#578

Open
sudhi76 wants to merge 1 commit intoopen-web3-stack:masterfrom
sudhi76:sudhi-max-child-bounties-fix
Open

fixed max child bounties count#578
sudhi76 wants to merge 1 commit intoopen-web3-stack:masterfrom
sudhi76:sudhi-max-child-bounties-fix

Conversation

@sudhi76
Copy link
Copy Markdown

@sudhi76 sudhi76 commented Mar 30, 2026

Description

This PR removes the workaround for the child bounties max count bug and updates the test to use the correct maxActiveChildBountyCount value directly.

Changes

  • Removed the greaterThanMaxActiveChildBountyCount variable that unnecessarily incremented the max count
  • Removed the TODO comment indicating the bug needed fixing
  • Updated the test expectations to correctly validate behavior at maxActiveChildBountyCount (not above it)

Why This Matters

The child_bounties pallet had a bug where it didn't properly enforce the maxActiveChildBountyCount constraint. This workaround was added to test around that issue. Now that the underlying bug has been fixed in the child_bounties release, the test can be simplified to use the correct limit value.

Related Issues

Fixes the TODO from the child_bounties create release fix.

@sudhi76
Copy link
Copy Markdown
Author

sudhi76 commented Mar 30, 2026

Hi @claude please review.

@github-actions
Copy link
Copy Markdown
Contributor

No issues found.

Copy link
Copy Markdown
Collaborator

@rockbmb rockbmb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! The fix hasn't made it to production runtimes yet, so we'll have to wait for that.


// ===== SECTION 4: Verify the transaction fails with TooManyChildBounties error =====

const ev = await extractExtrinsicFailedEvent(client)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is still failing in the CI checks; the fix from paritytech/polkadot-sdk#10713 hasn't yet made it to either Polkadot or Kusama.

@@ -2149,20 +2149,19 @@
// ===== SECTION 2: Set parent child bounties count to exceed maxActiveChildBountyCount =====

const maxActiveChildBountyCount = client.api.consts.childBounties.maxActiveChildBountyCount.toNumber()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment mentioning paritytech/polkadot-sdk#10713 ?

For future reference, as otherwise the fact that this problem occurred will be lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants