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

fix: add init logic of module accounts just in case (backport #1277) #1283

Merged
merged 2 commits into from
Mar 19, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 17, 2024

Description

  • (audit issue) add init logic of foundation module accounts to InitGenesis in order to eliminate potential panic
  • NOTE: This is likely to change account number state in auth module. --> InitGenesis never runs more than once

Motivation and context

How has this been tested?

Screenshots (if appropriate):

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.
  • I have updated API documentation client/docs/swagger-ui/swagger.yaml

This is an automatic backport of pull request #1277 done by [Mergify](https://mergify.com).

* fix: add init logic of module accounts just in case

* chore: update changelog

* chore: check if module account successfully created

* chore: fix lint

* chore: add test

* chore: fix test

(cherry picked from commit 089aff8)

# Conflicts:
#	CHANGELOG.md
#	x/foundation/keeper/internal/genesis_test.go
Copy link
Contributor Author

mergify bot commented Mar 17, 2024

Cherry-pick of 089aff8 has failed:

On branch mergify/bp/release/v0.48.x/pr-1277
Your branch is up to date with 'origin/release/v0.48.x'.

You are currently cherry-picking commit 089aff838.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   baseapp/block_gas_test.go
	modified:   x/foundation/keeper/internal/genesis.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   CHANGELOG.md
	both modified:   x/foundation/keeper/internal/genesis_test.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot added the conflicts label Mar 17, 2024
@0Tech 0Tech self-assigned this Mar 19, 2024
x/foundation/keeper/internal/genesis_test.go Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@0Tech 0Tech added A: bug Something isn't working C:x/foundation x/foundation module and removed conflicts labels Mar 19, 2024
@0Tech 0Tech self-requested a review March 19, 2024 03:17
Copy link

codecov bot commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.78%. Comparing base (647075f) to head (38d596c).

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##           release/v0.48.x    #1283   +/-   ##
================================================
  Coverage            69.78%   69.78%           
================================================
  Files                  646      646           
  Lines                67498    67503    +5     
================================================
+ Hits                 47103    47107    +4     
- Misses               18209    18210    +1     
  Partials              2186     2186           
Files Coverage Δ
x/foundation/keeper/internal/genesis.go 97.40% <100.00%> (+0.18%) ⬆️

... and 1 file with indirect coverage changes

@jaeseung-bae jaeseung-bae merged commit 6efd17d into release/v0.48.x Mar 19, 2024
47 checks passed
@jaeseung-bae jaeseung-bae deleted the mergify/bp/release/v0.48.x/pr-1277 branch March 19, 2024 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: bug Something isn't working C:x/foundation x/foundation module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants