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

Context: Remove Init/New #6797

Merged
merged 7 commits into from
Jul 20, 2020
Merged

Context: Remove Init/New #6797

merged 7 commits into from
Jul 20, 2020

Conversation

alexanderbez
Copy link
Contributor

@alexanderbez alexanderbez commented Jul 20, 2020

  • Remove New* and Init* client.Context functions ❤️ ❤️ ❤️ ❤️
  • Remove more usage of Viper
  • Fix TM config bug in command pre-run (thanks for bug catch @jgimeno)

ref: #6571


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

@codecov
Copy link

codecov bot commented Jul 20, 2020

Codecov Report

Merging #6797 into master will decrease coverage by 0.36%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #6797      +/-   ##
==========================================
- Coverage   60.80%   60.44%   -0.37%     
==========================================
  Files         510      514       +4     
  Lines       31523    31635     +112     
==========================================
- Hits        19168    19121      -47     
- Misses      10883    11048     +165     
+ Partials     1472     1466       -6     

@alexanderbez alexanderbez changed the title rpc: Update CLI Context: Remove Init/New Jul 20, 2020
@alexanderbez alexanderbez added A:automerge Automatically merge PR once all prerequisites pass. C:CLI Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity. labels Jul 20, 2020
@@ -142,6 +142,8 @@ func interceptConfigs(ctx *Context, rootViper *viper.Viper) (*tmcfg.Config, erro
}
}

conf.SetRoot(rootDir)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

/cc @jgimeno - This fixes the issue you were seeing.

@@ -56,126 +51,6 @@ type Context struct {
Codec *codec.Codec
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This makes me so happy ^__^

Copy link
Member

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

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

utACK

@mergify mergify bot merged commit 515b25b into master Jul 20, 2020
@mergify mergify bot deleted the bez/rpc-cli-refactor branch July 20, 2020 16:42
@alexanderbez alexanderbez mentioned this pull request Jul 20, 2020
27 tasks
chengwenxi pushed a commit to irisnet/cosmos-sdk that referenced this pull request Jul 22, 2020
* init commit

* remove new/init functions

* update CLI commands

* tests: fix TestCLIQueryConn

* remove viper
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:CLI Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants