-
Notifications
You must be signed in to change notification settings - Fork 95
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
NTRN-383 revision number and height in query #165
Conversation
x/interchainqueries/keeper/keeper.go
Outdated
// to avoid nil in neutron, null in json and rust marshalling errors, here we initialize it with "default" values | ||
// which is not equal 0 because github.com/cosmos/cosmos-sdk/codec/types skips true default values | ||
emptyHeight := ibcclienttypes.NewHeight(1, 1) | ||
if query.LastSubmittedResultRemoteHeight == nil { |
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.
Why not just to use Option<u64>
on sc level?
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 you meant Option<Height>
, I believe couple of simple lines in neutron node is a bit preferable than unnecessary complications in our smart contracts, also we should init this struct anyway (in other place), even w Option
x/interchainqueries/keeper/keeper.go
Outdated
if query.LastSubmittedResultRemoteHeight.RevisionNumber < height.GetRevisionNumber() { | ||
return nil | ||
} else if query.LastSubmittedResultRemoteHeight.RevisionHeight >= height.GetRevisionHeight() && | ||
query.LastSubmittedResultRemoteHeight.RevisionNumber == height.GetRevisionNumber() { |
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.
ibcclienttypes.Height
has all the necessary methods to compare two structs (LTE
, GTE
, etc).
…mber-and-height # Conflicts: # x/interchainqueries/types/genesis.pb.go
3858936
to
e01e41d
Compare
Talked to @swelf19, going too try smth to make it look a bit better |
5c82cbe
to
999d7d8
Compare
The base branch was changed.
TASK
TEST
There are bunch of PRs: