-
Notifications
You must be signed in to change notification settings - Fork 585
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: assert previous channel identifer is empty in Msg ValidateBasic #1792
Conversation
…annel id to be empty
{"too short channel id", types.NewMsgChannelOpenTry(portid, invalidShortChannel, version, types.ORDERED, connHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, | ||
{"too long channel id", types.NewMsgChannelOpenTry(portid, invalidLongChannel, version, types.ORDERED, connHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, | ||
{"channel id contains non-alpha", types.NewMsgChannelOpenTry(portid, invalidChannel, version, types.ORDERED, connHops, cpportid, cpchanid, version, suite.proof, height, addr), false}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed these three cases
{"invalid counterparty channel id", types.NewMsgChannelOpenTry(portid, version, types.UNORDERED, connHops, cpportid, invalidChannel, version, suite.proof, height, addr), false}, | ||
{"empty proof", types.NewMsgChannelOpenTry(portid, version, types.UNORDERED, connHops, cpportid, cpchanid, version, emptyProof, height, addr), false}, | ||
{"channel not in TRYOPEN state", &types.MsgChannelOpenTry{portid, "", initChannel, version, suite.proof, height, addr}, false}, | ||
{"previous channel id is not empty", &types.MsgChannelOpenTry{portid, chanid, initChannel, version, suite.proof, height, addr}, false}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added this test case
Codecov Report
@@ Coverage Diff @@
## main #1792 +/- ##
==========================================
- Coverage 79.92% 79.92% -0.01%
==========================================
Files 166 166
Lines 12439 12437 -2
==========================================
- Hits 9942 9940 -2
Misses 2030 2030
Partials 467 467
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @colin-axner!
Co-authored-by: Carlos Rodriguez <[email protected]>
Co-authored-by: Carlos Rodriguez <[email protected]>
…1792) * remove previous channel id from NewMsgChanOpenTry, assert previous channel id to be empty * add changelog entry * move changelog entry to correct location * add migration docs * Update docs/migrations/v3-to-v4.md Co-authored-by: Carlos Rodriguez <[email protected]> * Update CHANGELOG.md Co-authored-by: Carlos Rodriguez <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]> (cherry picked from commit 4a781e5) # Conflicts: # CHANGELOG.md
…(backport #1792) (#1827) * fix: assert previous channel identifer is empty in Msg ValidateBasic (#1792) * remove previous channel id from NewMsgChanOpenTry, assert previous channel id to be empty * add changelog entry * move changelog entry to correct location * add migration docs * Update docs/migrations/v3-to-v4.md Co-authored-by: Carlos Rodriguez <[email protected]> * Update CHANGELOG.md Co-authored-by: Carlos Rodriguez <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]> (cherry picked from commit 4a781e5) # Conflicts: # CHANGELOG.md * fix conflicts Co-authored-by: colin axnér <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]>
…(backport cosmos#1792) (cosmos#1827) * fix: assert previous channel identifer is empty in Msg ValidateBasic (cosmos#1792) * remove previous channel id from NewMsgChanOpenTry, assert previous channel id to be empty * add changelog entry * move changelog entry to correct location * add migration docs * Update docs/migrations/v3-to-v4.md Co-authored-by: Carlos Rodriguez <[email protected]> * Update CHANGELOG.md Co-authored-by: Carlos Rodriguez <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]> (cherry picked from commit 4a781e5) # Conflicts: # CHANGELOG.md * fix conflicts Co-authored-by: colin axnér <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]>
…(backport cosmos#1792) (cosmos#1827) * fix: assert previous channel identifer is empty in Msg ValidateBasic (cosmos#1792) * remove previous channel id from NewMsgChanOpenTry, assert previous channel id to be empty * add changelog entry * move changelog entry to correct location * add migration docs * Update docs/migrations/v3-to-v4.md Co-authored-by: Carlos Rodriguez <[email protected]> * Update CHANGELOG.md Co-authored-by: Carlos Rodriguez <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]> (cherry picked from commit 4a781e5) # Conflicts: # CHANGELOG.md * fix conflicts Co-authored-by: colin axnér <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]>
…(backport cosmos#1792) (cosmos#1827) * fix: assert previous channel identifer is empty in Msg ValidateBasic (cosmos#1792) * remove previous channel id from NewMsgChanOpenTry, assert previous channel id to be empty * add changelog entry * move changelog entry to correct location * add migration docs * Update docs/migrations/v3-to-v4.md Co-authored-by: Carlos Rodriguez <[email protected]> * Update CHANGELOG.md Co-authored-by: Carlos Rodriguez <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]> (cherry picked from commit 4a781e5) # Conflicts: # CHANGELOG.md * fix conflicts Co-authored-by: colin axnér <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]>
Description
closes: #1778
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.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes