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 zero coins #9229

Merged
merged 10 commits into from
Apr 30, 2021
Merged

fix zero coins #9229

merged 10 commits into from
Apr 30, 2021

Conversation

atheeshp
Copy link
Contributor

Description

closes: #9159


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.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@colin-axner
Copy link
Contributor

Tested commit 6665f8b with our tests and it passes as expected

@atheeshp atheeshp marked this pull request as ready for review April 29, 2021 14:38
@codecov
Copy link

codecov bot commented Apr 29, 2021

Codecov Report

Merging #9229 (669ac72) into master (6fbded9) will increase coverage by 0.06%.
The diff coverage is 67.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9229      +/-   ##
==========================================
+ Coverage   60.06%   60.12%   +0.06%     
==========================================
  Files         595      595              
  Lines       37355    37190     -165     
==========================================
- Hits        22437    22361      -76     
+ Misses      12929    12848      -81     
+ Partials     1989     1981       -8     
Impacted Files Coverage Δ
codec/types/interface_registry.go 57.95% <ø> (-4.55%) ⬇️
server/rosetta/client_online.go 0.00% <0.00%> (ø)
types/codec.go 66.66% <ø> (+16.66%) ⬆️
types/simulation/types.go 0.00% <0.00%> (ø)
types/tx_msg.go 0.00% <0.00%> (ø)
x/authz/keeper/msg_server.go 0.00% <0.00%> (ø)
x/authz/types/codec.go 0.00% <0.00%> (ø)
x/authz/types/generic_authorization.go 60.00% <ø> (-11.43%) ⬇️
x/bank/client/testutil/cli_helpers.go 50.00% <ø> (+41.89%) ⬆️
x/feegrant/types/filtered_fee.go 0.00% <0.00%> (ø)
... and 31 more

x/bank/keeper/keeper.go Show resolved Hide resolved
x/bank/keeper/send.go Outdated Show resolved Hide resolved
Co-authored-by: Federico Kunze <[email protected]>
x/bank/keeper/keeper.go Outdated Show resolved Hide resolved
x/bank/keeper/keeper_test.go Outdated Show resolved Hide resolved
x/bank/keeper/keeper_test.go Outdated Show resolved Hide resolved
x/bank/keeper/send.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

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

Looks good. Left one more suggestion.


// add module accounts to supply keeper
maccPerms := getModuleAccPerms()
authKeeper := authkeeper.NewAccountKeeper(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you can add authKeepr and bank keeper constructor to the same function - it's always used and repeated next to the maccPerms.

@amaury1093 amaury1093 added the A:automerge Automatically merge PR once all prerequisites pass. label Apr 30, 2021
@mergify mergify bot merged commit f04b5dc into master Apr 30, 2021
@mergify mergify bot deleted the atheesh/fix-zero-coins branch April 30, 2021 16:54
mergify bot pushed a commit that referenced this pull request Apr 30, 2021
* fix zero coins issue

* fix tests

* udpate tests

* Review change

Co-authored-by: Federico Kunze <[email protected]>

* add change log

* review changes

* review changes

Co-authored-by: Federico Kunze <[email protected]>
(cherry picked from commit f04b5dc)

# Conflicts:
#	CHANGELOG.md
#	x/bank/keeper/genesis_test.go
#	x/bank/keeper/keeper.go
#	x/bank/keeper/keeper_test.go
#	x/bank/keeper/send.go
@aaronc
Copy link
Member

aaronc commented Jul 7, 2021

@AmauryM did we do a migration for this? i.e. are we deleting zero balances for chains upgrading to 0.43?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:x/bank
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bank and Supply are not pruning zero coins causing invariants to break
7 participants