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

feat: load fbridge & fswap store #365

Merged
merged 2 commits into from
May 10, 2024
Merged

Conversation

0Tech
Copy link
Contributor

@0Tech 0Tech commented May 10, 2024

Description

This patch adds setupUpgradeStoreLoaders(), which handles store upgrades.

How has this been tested?

  1. Start v3-Rose chain.
  2. Upgrade the chain to v4-Marigold.
  3. Access the new module's state.
    • e.g. fnsad q fswap swaps
  • Expected results:
    • Without the patch: panics
      • Error: Query failed with (111222): runtime error: invalid memory address or nil pointer dereference: panic
    • With the patch: returns an empty array of swaps.

Checklist:

  • I followed the contributing guidelines and code of conduct.
  • I have added a relevant changelog to CHANGELOG.md
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.

@0Tech 0Tech self-assigned this May 10, 2024
Copy link

codecov bot commented May 10, 2024

Codecov Report

Attention: Patch coverage is 36.84211% with 12 lines in your changes are missing coverage. Please review.

Project coverage is 52.24%. Comparing base (281b1e1) to head (7337312).
Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #365      +/-   ##
==========================================
+ Coverage   50.28%   52.24%   +1.95%     
==========================================
  Files          10       10              
  Lines        1406     1116     -290     
==========================================
- Hits          707      583     -124     
+ Misses        654      486     -168     
- Partials       45       47       +2     
Files Coverage Δ
app/app.go 82.10% <36.84%> (-1.74%) ⬇️

... and 7 files with indirect coverage changes

@0Tech 0Tech marked this pull request as ready for review May 10, 2024 00:30
Copy link
Member

@zemyblue zemyblue left a comment

Choose a reason for hiding this comment

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

How can we test this modifications?
Because there is no unittest.

@0Tech
Copy link
Contributor Author

0Tech commented May 10, 2024

How can we test this modifications? Because there is no unittest.

I've added the test in the PR description.

@0Tech 0Tech requested a review from zemyblue May 10, 2024 01:01
@0Tech 0Tech merged commit 70f49fd into Finschia:main May 10, 2024
42 checks passed
@0Tech 0Tech deleted the add-new-modules branch May 10, 2024 01:42
mergify bot pushed a commit that referenced this pull request May 10, 2024
* Setup upgrade store loaders

* Update CHANGELOG.md

(cherry picked from commit 70f49fd)
0Tech added a commit that referenced this pull request May 10, 2024
* Setup upgrade store loaders

* Update CHANGELOG.md

(cherry picked from commit 70f49fd)

Co-authored-by: Youngtaek Yoon <noreply@yoon.mailer.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants