-
Notifications
You must be signed in to change notification settings - Fork 586
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 the Order
check in ValidateUpgradeFields
util method
#3774
update the Order
check in ValidateUpgradeFields
util method
#3774
Conversation
Order
check in ValidateUpgradeFields
util method
@@ -278,8 +278,8 @@ func (k Keeper) validateUpgradeFields(ctx sdk.Context, proposedUpgrade types.Upg | |||
} | |||
|
|||
connectionID := proposedUpgrade.ConnectionHops[0] | |||
connection, err := k.GetConnection(ctx, connectionID) | |||
if err != nil { | |||
connection, found := k.connectionKeeper.GetConnection(ctx, connectionID) |
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.
This is because k.GetConnection
was returning the interface exported.ConnectionI
rather than the concrete ConnectionEnd
type, right? So that GetVersions()
can be used below.
Should we add GetVersions()
as an interface method to exported.ConnectionI
? cc. @colin-axner
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.
yes, precisely @damiannolan, i'd be in favour of adding GetVersions(), i think it's the only method missing from the keeper methods in the ConnectionI
interface
@@ -554,7 +556,7 @@ func (suite *KeeperTestSuite) TestValidateProposedUpgradeFields() { | |||
{ | |||
name: "change channel version", | |||
malleate: func() { | |||
proposedUpgrade.Version = "1.0.0" | |||
proposedUpgrade.Version = mockUpgradeVersion |
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.
there is mock.UpgradeVersion
now, can we use that?
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.
ah, yes, forgot about that value! i can use it.
…dateupgradefields
…ub.com:cosmos/ibc-go into charly/#3635-order-check-validateupgradefields
…dateupgradefields
Description
closes: #3635
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.Files changed
in the Github PR explorer.Codecov Report
in the comment section below once CI passes.