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

ibc/03-connection: import export GenesisState #6067

Merged
merged 11 commits into from
Apr 24, 2020

Conversation

fedekunze
Copy link
Collaborator

@fedekunze fedekunze commented Apr 23, 2020

ref: #5948

Description


For contributor use:

  • 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

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@fedekunze fedekunze added x/ibc C:genesis relating to chain genesis labels Apr 23, 2020
@fedekunze fedekunze self-assigned this Apr 23, 2020
x/ibc/genesis_test.go Outdated Show resolved Hide resolved
x/ibc/genesis_test.go Outdated Show resolved Hide resolved
x/ibc/genesis_test.go Outdated Show resolved Hide resolved
@@ -72,6 +83,12 @@ func (c ConnectionEnd) ValidateBasic() error {
return sdkerrors.Wrap(ibctypes.ErrInvalidVersion, "version can't be blank")
}
}
if c.ID == c.Counterparty.ConnectionID {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added these 2 extra validations @cwgoes

Copy link
Contributor

Choose a reason for hiding this comment

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

Why? It's fine if the identifiers are the same.

@fedekunze fedekunze marked this pull request as ready for review April 24, 2020 14:22
@fedekunze fedekunze added R4R and removed WIP labels Apr 24, 2020
@fedekunze fedekunze requested a review from cwgoes April 24, 2020 14:22
@codecov
Copy link

codecov bot commented Apr 24, 2020

Codecov Report

Merging #6067 into master will decrease coverage by 0.28%.
The diff coverage is 64.93%.

@@            Coverage Diff             @@
##           master    #6067      +/-   ##
==========================================
- Coverage   54.64%   54.35%   -0.29%     
==========================================
  Files         426      430       +4     
  Lines       25890    26107     +217     
==========================================
+ Hits        14148    14191      +43     
- Misses      10763    10937     +174     
  Partials      979      979              

Copy link
Contributor

@cwgoes cwgoes left a comment

Choose a reason for hiding this comment

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

Import/export bits look fine but I don't think the additional validation is necessary.

x/ibc/03-connection/keeper/keeper.go Show resolved Hide resolved
@@ -72,6 +83,12 @@ func (c ConnectionEnd) ValidateBasic() error {
return sdkerrors.Wrap(ibctypes.ErrInvalidVersion, "version can't be blank")
}
}
if c.ID == c.Counterparty.ConnectionID {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why? It's fine if the identifiers are the same.

x/ibc/03-connection/types/connection.go Outdated Show resolved Hide resolved
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

Changes look pretty straightforward to me. I can't speak to the actual validation business logic.

@fedekunze fedekunze requested a review from cwgoes April 24, 2020 15:38
@fedekunze fedekunze added the A:automerge Automatically merge PR once all prerequisites pass. label Apr 24, 2020
@mergify mergify bot merged commit e9b5fc9 into master Apr 24, 2020
@mergify mergify bot deleted the fedekunze/import-export-ibc-pt-1 branch April 24, 2020 15:52
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:genesis relating to chain genesis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants