Skip to content

fix(wmint): avoid begin blocker mint panics#1048

Open
modelsbridgeaicom-ship-it wants to merge 1 commit into
openmetaearth:mainfrom
modelsbridgeaicom-ship-it:codex/wmint-beginblocker-error-return-276
Open

fix(wmint): avoid begin blocker mint panics#1048
modelsbridgeaicom-ship-it wants to merge 1 commit into
openmetaearth:mainfrom
modelsbridgeaicom-ship-it:codex/wmint-beginblocker-error-return-276

Conversation

@modelsbridgeaicom-ship-it

Copy link
Copy Markdown
Contributor

Summary

Addresses the WMINT-NEW-001 portion of #276.

BeginBlocker previously panicked if minting or treasury transfer failed. It also wrote minted counters before those bank operations completed. This change runs the minted counters, MintCoins, and treasury transfer in a cache context, logs and returns on failure, and commits only after both bank operations succeed. That prevents begin-block failures from halting the chain or leaving partial wmint state behind.

Tests

Passed:

..\..\tools\go\bin\go.exe test .\x\wmint -run "TestKeeperTestSuite/TestBeginBlocker(DoesNotPanicWhenMintFails|DoesNotCommitWhenTreasurySendFails)$" -count=1 -v
..\..\tools\go\bin\go.exe test .\x\wmint -count=1
git diff --check

@koelzen koelzen added run-ci Trigger CI run and removed run-ci Trigger CI run labels Jun 10, 2026
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