-
Notifications
You must be signed in to change notification settings - Fork 579
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
chore: Change Query/DenomTrace gRPC #1312
Changes from 7 commits
ed299c6
e03e19b
b16f70a
9c0c664
bb0ca24
951b0e1
c81a378
4fea4c3
49d08cb
7e2318e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,10 +21,10 @@ func (suite *KeeperTestSuite) TestQueryDenomTrace() { | |
expPass bool | ||
}{ | ||
{ | ||
"invalid hex hash", | ||
"invalid ibc denom", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: could we put the success case first? :=) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yesss |
||
func() { | ||
req = &types.QueryDenomTraceRequest{ | ||
Hash: "!@#!@#!", | ||
Denom: "!@#!@#!", | ||
} | ||
}, | ||
false, | ||
|
@@ -35,7 +35,7 @@ func (suite *KeeperTestSuite) TestQueryDenomTrace() { | |
expTrace.Path = "transfer/channelToA/transfer/channelToB" | ||
expTrace.BaseDenom = "uatom" | ||
req = &types.QueryDenomTraceRequest{ | ||
Hash: expTrace.Hash().String(), | ||
Denom: expTrace.IBCDenom(), | ||
} | ||
}, | ||
false, | ||
|
@@ -48,7 +48,7 @@ func (suite *KeeperTestSuite) TestQueryDenomTrace() { | |
suite.chainA.GetSimApp().TransferKeeper.SetDenomTrace(suite.chainA.GetContext(), expTrace) | ||
|
||
req = &types.QueryDenomTraceRequest{ | ||
Hash: expTrace.Hash().String(), | ||
Denom: expTrace.IBCDenom(), | ||
} | ||
}, | ||
true, | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
I think we should make this change backwards compatible. We could do so by checking if it has the ibc prefix and then remove the prefix before performing the query. I should have specified this on the original issue (but at the time there was a lot less dependencies on this gRPC
So essentially:
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.
If so, how should we name the field in the gRPC request, is it still
denom
, now that the field means denom or hashThere 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.
So I'll make it like you said and leave the field name still be
denom
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.
That's a good suggestion from @colin-axner. If you make the change backwards compatible, then the changelog entry shouldn't be in the API breaking section, but in the improvements one instead.
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.
I'll apply the change accordingly and I'll change the field back to
hash