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

rename RegisterCodec to RegisterLegacyAminoCodec #7243

Merged
merged 11 commits into from
Sep 7, 2020

Conversation

anilcse
Copy link
Collaborator

@anilcse anilcse commented Sep 5, 2020

Description

Module's RegisterCodec is bit ambiguous, it states that it registers any given codec but registers only LegacyAmino codec.
RegisterLegacyAminoCodec is self explanatory

  • Rename RegisterCodec to RegisterLegacyAminoCodec
  • Rename codec.New() to codec.NewLegacyAmino()

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 Sep 5, 2020

Codecov Report

Merging #7243 into master will decrease coverage by 0.69%.
The diff coverage is 91.11%.

@@            Coverage Diff             @@
##           master    #7243      +/-   ##
==========================================
- Coverage   54.92%   54.22%   -0.70%     
==========================================
  Files         575      425     -150     
  Lines       39544    30565    -8979     
==========================================
- Hits        21718    16574    -5144     
+ Misses      16032    12661    -3371     
+ Partials     1794     1330     -464     

Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

Thanks @anilcse, good idea!

There's also the New() function in /codec/amino.go, I think it would be good to replace codec.New() by codec.NewLegacyAmino(), wdyt? In this PR or a later one.

@anilcse
Copy link
Collaborator Author

anilcse commented Sep 7, 2020

Thanks @anilcse, good idea!

There's also the New() function in /codec/amino.go, I think it would be good to replace codec.New() by codec.NewLegacyAmino(), wdyt? In this PR or a later one.

Updated

Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

good to go if tests pass

CHANGELOG.md Outdated Show resolved Hide resolved
fedekunze and others added 2 commits September 7, 2020 15:02
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
@fedekunze fedekunze added the A:automerge Automatically merge PR once all prerequisites pass. label Sep 7, 2020
…e_register_codec

# Conflicts:
#	x/distribution/client/cli/tx_test.go
@mergify mergify bot merged commit 64b6bb5 into master Sep 7, 2020
@mergify mergify bot deleted the anil/rename_register_codec branch September 7, 2020 14:47
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
* rename RegisterCodec to RegisterLegacyAminoCodec

* Add changelog

* gofmt

* rename codec.New() to codec.NewLegacyAmino()

* Add change log

* Update CHANGELOG.md

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>

* Fix

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants