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

update logic ExportAppStateAndValidators function #918

Conversation

ThanhNhann
Copy link
Contributor

@ThanhNhann ThanhNhann commented Feb 3, 2023

👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻

Close: #920

What is the purpose of the change

  • Update logic return of ExportAppStateAndValidators function
  • This is a small thing, but important for the logic code

PR Checklist:

  • Have you read the CONTRIBUTING.md?
  • Does your PR follow the C4 patch requirements?
  • Have you rebased your work on top of the latest master?
  • Have you checked your code compiles? (make)
  • Have you included tests for any non-trivial functionality?
  • Have you checked your code passes the unit tests? (make test)
  • Have you checked your code formatting is correct? (go fmt)
  • Have you checked your basic code style is fine? (golangci-lint run)
  • If you added any dependencies, have you checked they do not contain any known vulnerabilities? (go list -json -m all | nancy sleuth)
  • If your changes affect the client infrastructure, have you run the integration test?
  • If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
  • If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?
  • If you are contributing for the first time, please read the agreement in CONTRIBUTING.md now and add a comment to this pull request stating that your PR is in accordance with the Developer's Certificate of Origin.

Thank you for your code, it's appreciated! :)

@ThanhNhann ThanhNhann requested a review from a team as a code owner February 3, 2023 07:36
Copy link
Contributor

@tomtau tomtau left a comment

Choose a reason for hiding this comment

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

@ThanhNhann would you mind opening an issue to detail the problem this is solving?

@ThanhNhann
Copy link
Contributor Author

hi @tomtau, thank you for your reply, I just created the issue for this pr: #920
plz check

@@ -40,12 +40,15 @@ func (app *ChainApp) ExportAppStateAndValidators(
}

validators, err := staking.WriteValidators(ctx, app.StakingKeeper)
Copy link
Contributor

Choose a reason for hiding this comment

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

err here is actually nil

Copy link
Collaborator

@yihuang yihuang Feb 6, 2023

Choose a reason for hiding this comment

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

the output err is never assigned, we need to fix in cosmos-sdk then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank @yihuang for your update

@codecov
Copy link

codecov bot commented Feb 8, 2023

Codecov Report

Merging #918 (e12fa5a) into master (9ca54f5) will increase coverage by 8.06%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #918      +/-   ##
==========================================
+ Coverage   14.40%   22.47%   +8.06%     
==========================================
  Files         120      117       -3     
  Lines       14372    13495     -877     
==========================================
+ Hits         2071     3033     +962     
+ Misses      11830     9870    -1960     
- Partials      471      592     +121     
Flag Coverage Δ
integration_tests 20.71% <0.00%> (+6.30%) ⬆️
unit_tests 5.94% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
app/export.go 0.00% <0.00%> (ø)
x/nft/simulation/genesis.go 0.00% <0.00%> (ø)
x/nft/simulation/operations.go 0.00% <0.00%> (ø)
x/icaauth/keeper/params.go
x/icaauth/types/params.go
x/supply/types/key.go
x/nft/keeper/msg_server.go 81.73% <0.00%> (+1.56%) ⬆️
x/nft/module.go 71.79% <0.00%> (+7.69%) ⬆️
x/nft/types/query.pb.go 17.15% <0.00%> (+7.88%) ⬆️
... and 39 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

app/export.go Outdated Show resolved Hide resolved
Signed-off-by: Tomas Tauber <[email protected]>
@tomtau
Copy link
Contributor

tomtau commented Feb 8, 2023

will update to a newer Cosmos SDK in a subsequent PR

@tomtau tomtau merged commit f18f988 into crypto-org-chain:master Feb 8, 2023
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.

Problem: Lack error check in ExportAppStateAndValidators function
4 participants