-
Notifications
You must be signed in to change notification settings - Fork 329
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
Make all handlers emit an IbcEvent
with height ctx.host_height()
#2043
Conversation
IbcEvent
with height ctx.host_height()
|
||
for event in handler_output.events.iter() { | ||
assert!(matches!(event, &IbcEvent::CloseInitChannel(_))); | ||
assert_eq!(event.height(), context.host_height()); |
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.
Cool, thanks for adding mock tests here and for channel close confirm!
|
||
if !packet.timeout_height.is_zero() && packet_height <= latest_height { | ||
if !packet.timeout_height.is_zero() && packet.timeout_height <= latest_height { |
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 change makes sense.
On a related topic, there is a comment above (L60) that is confusing me, specifically:
// check if packet height is newer than the height of the latest client state on the receiving chain
The receiving chain is the local chain (the one hosting & running the current ics04 module). It's not obvious to me what is the connection we meant to make between "latest client state" and "packet height". We should clarify that, or remove the comment if stale.
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.
It doesn't make sense to me either, so I'll just remove it.
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 a few comments that were either confusing or didn't say much f8525a6867
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 @plafer 🙏
Closes: cosmos/ibc-rs#52
Description
Make all handlers emit an
IbcEvent
with heightctx.host_height()
.PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.