-
Notifications
You must be signed in to change notification settings - Fork 386
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
Packet.timeoutHeight
should have type Option<Height>
(or equivalent)
#776
Comments
Hmm, but even if height It seems like we could change the implementation to reflect this. Though it is a very minor improvement |
I would personally wouldn't error on height
I'm not sure I understand what you mean here. To rephrase my suggestion,
I consider it relatively important, as currently timeout heights don't work like all other heights. In the Rust implementation, we had to create a new type |
How would this work with the current ibc-go implementation where the type is a uint64 at the moment? |
Indeed it would be a breaking change to fix this. I opted to flag it regardless, in case there ever is a backward incompatible v2 of the protocol. |
Packet.timeoutHeight
treats the minimum height0
specially: a height of0
means "no timeout". This is taken from this check intimeoutPacket()
:This is inconsistent with the ICS-2 definition of
Height
, which specifies that0
is a valid height. It would be cleaner to represent this special case directly in the type: anything equivalent to Rust'sOption<Height>
(orOption<NonZeroHeight>
depending on if we want to allow a timeout at height0
or not).The text was updated successfully, but these errors were encountered: