-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fix the bank params migration. #1967
Conversation
…nd just sets DefaultSendEnabled to true (that's what both mainnet and testnet have). The umber tests were failing because the two bank params keys didn't exist. But if I added the key tables, it'd then blow up because the values are nil for the tests. This way is just easier and safer.
…pass since they all pass now.
WalkthroughThe recent updates primarily focus on refining the error handling and parameter migration processes across various modules in a software project. Significant changes include the removal of specific package references in testing configurations, enhancements in bank parameter migrations, and updates to several modules as noted in the change log. Changes
Poem
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? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Out of diff range and nitpick comments (5)
CHANGELOG.md (5)
Line range hint
79-321
: Convert unordered list markers from dashes to asterisks for consistency.- - + *
Line range hint
198-619
: Convert bare URLs to Markdown links for better readability and consistency.- https://github.com/provenance-io/provenance/issues/105 + [https://github.com/provenance-io/provenance/issues/105](https://github.com/provenance-io/provenance/issues/105)
Line range hint
915-915
: Remove spaces inside emphasis markers to correct Markdown formatting.- * message * + *message*
Line range hint
311-311
: Remove spaces inside code span elements to correct Markdown formatting.- ` message ` + `message`
Line range hint
787-1361
: Ensure there is only one consecutive blank line to maintain clean and consistent formatting.- +
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- .github/workflows/test.yml (2 hunks)
- CHANGELOG.md (1 hunks)
- app/upgrades.go (1 hunks)
Files skipped from review due to trivial changes (1)
- .github/workflows/test.yml
Additional comments not posted (1)
app/upgrades.go (1)
317-328
: The modifications tomigrateBankParams
ensure robustness by settingDefaultSendEnabled
totrue
. This change addresses potential issues with nil values during tests and prevents system panics.Ensure that all modules interacting with bank parameters are compatible with this change.
* [1760]: Fix the bank params migration. It now ignored current state and just sets DefaultSendEnabled to true (that's what both mainnet and testnet have). The umber tests were failing because the two bank params keys didn't exist. But if I added the key tables, it'd then blow up because the values are nil for the tests. This way is just easier and safer. * [1760]: In the unit test github actions, re-require the app tests to pass since they all pass now. * [1760]: Add changelog entry.
Description
This PR fixes the bank params migration. It also makes github require the
app
unit tests to pass, since they're all fixed now.The existing one wasn't working because the old key table wasn't being added anymore. But when I added it, the migration would then fail unit tests because the values were nil, which causes the params module to panic when we try to get them. During an actual upgrade, they'd exist, probably, but there's no good/easy way to test for that.
The bank params have two fields:
SendEnabled
andDefaultSendEnabled
. The former is deprecated and now stored directly in state. We migrated those out of the bank params a few upgrades ago. So all we need now is the latter. Both mainnet and testnet haveDefaultSendEnabled
set totrue
. So, because of the possible problems with looking it up, this PR instead just sets it to true and stores it in the new place.Related to:
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passesSummary by CodeRabbit
Chores
Documentation
Refactor