Skip to content

Game: Charge the awarded-credit entries that step 2 of the player process clears - #267

Merged
andrzejSulkowski merged 4 commits into
mainfrom
as-clear-game-credits-walk
Nov 25, 2026
Merged

andrzejSulkowski merged 4 commits into
mainfrom
as-clear-game-credits-walk

Conversation

@andrzejSulkowski

@andrzejSulkowski andrzejSulkowski commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #266.

Step 2 of the player process charged only the keys that it walked in the index maps. clear_game_credits returned only a cursor, so the step could not count the credit entries that it cleared.

Changes

  • AwardCredits::clear_game_credits returns the removal result and takes no cursor.
  • Step 2 charges the chunks of credit entries that it clears.

The benchmarks do the same work as before, so the weights are not regenerated.

@andrzejSulkowski
andrzejSulkowski requested a review from a team as a code owner November 23, 2026 15:55
@andrzejSulkowski andrzejSulkowski added D5-nice to have audit optional to have, meant to express "audit it if there is bandwidth" C0-non-breaking This PR is not a breaking change for any runtime consuming it. labels Nov 23, 2026
Comment thread pallets/game/src/lib.rs Resolved
Comment thread support/src/credit_trees.rs Resolved
@andrzejSulkowski
andrzejSulkowski force-pushed the as-clear-game-credits-walk branch 3 times, most recently from 701e523 to ea323d2 Compare November 24, 2026 14:49
Comment thread support/src/credit_trees.rs Resolved
@andrzejSulkowski
andrzejSulkowski force-pushed the as-clear-game-credits-walk branch 2 times, most recently from 4b9ee53 to e086880 Compare November 25, 2026 13:44
Base automatically changed from as-fix-game-clear-cursor to main November 25, 2026 14:07
andrzejSulkowski and others added 3 commits November 25, 2026 16:07
Co-authored-by: theo <37565691+agustinustheo@users.noreply.github.com>
Signed-off-by: Andrzej Sulkowski <developer@andrzej-sulkowski.com>
@andrzejSulkowski
andrzejSulkowski force-pushed the as-clear-game-credits-walk branch from e086880 to 1c03aa8 Compare November 25, 2026 14:07
@andrzejSulkowski
andrzejSulkowski enabled stacked auto-merge (squash) November 25, 2026 14:24
@andrzejSulkowski
andrzejSulkowski merged commit a0c124d into main Nov 25, 2026
19 of 21 checks passed
@andrzejSulkowski
andrzejSulkowski deleted the as-clear-game-credits-walk branch November 25, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C0-non-breaking This PR is not a breaking change for any runtime consuming it. D5-nice to have audit optional to have, meant to express "audit it if there is bandwidth"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants