Skip to content

Commit

Permalink
Add some comments on timeout_timestamp format
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanfrey committed Jan 20, 2021
1 parent 31a5d0d commit a80f200
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions contracts/ibc-reflect/schema/packet_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
]
},
"timeout_timestamp": {
"description": "block timestamp (in nanoseconds) after which the packet times out. at least one of timeout_height, timeout_timestamp is required",
"description": "block timestamp (nanoseconds since UNIX epoch) after which the packet times out. See https://golang.org/pkg/time/#Time.UnixNano at least one of timeout_height, timeout_timestamp is required",
"type": [
"integer",
"null"
Expand Down Expand Up @@ -283,7 +283,7 @@
]
},
"timeout_timestamp": {
"description": "block timestamp (in nanoseconds) after which the packet times out. at least one of timeout_height, timeout_timestamp is required",
"description": "block timestamp (nanoseconds since UNIX epoch) after which the packet times out. See https://golang.org/pkg/time/#Time.UnixNano at least one of timeout_height, timeout_timestamp is required",
"type": [
"integer",
"null"
Expand Down
4 changes: 2 additions & 2 deletions contracts/reflect/schema/handle_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
]
},
"timeout_timestamp": {
"description": "block timestamp (in nanoseconds) after which the packet times out. at least one of timeout_height, timeout_timestamp is required",
"description": "block timestamp (nanoseconds since UNIX epoch) after which the packet times out. See https://golang.org/pkg/time/#Time.UnixNano at least one of timeout_height, timeout_timestamp is required",
"type": [
"integer",
"null"
Expand Down Expand Up @@ -303,7 +303,7 @@
]
},
"timeout_timestamp": {
"description": "block timestamp (in nanoseconds) after which the packet times out. at least one of timeout_height, timeout_timestamp is required",
"description": "block timestamp (nanoseconds since UNIX epoch) after which the packet times out. See https://golang.org/pkg/time/#Time.UnixNano at least one of timeout_height, timeout_timestamp is required",
"type": [
"integer",
"null"
Expand Down
4 changes: 2 additions & 2 deletions contracts/reflect/schema/handle_response_for__custom_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
]
},
"timeout_timestamp": {
"description": "block timestamp (in nanoseconds) after which the packet times out. at least one of timeout_height, timeout_timestamp is required",
"description": "block timestamp (nanoseconds since UNIX epoch) after which the packet times out. See https://golang.org/pkg/time/#Time.UnixNano at least one of timeout_height, timeout_timestamp is required",
"type": [
"integer",
"null"
Expand Down Expand Up @@ -306,7 +306,7 @@
]
},
"timeout_timestamp": {
"description": "block timestamp (in nanoseconds) after which the packet times out. at least one of timeout_height, timeout_timestamp is required",
"description": "block timestamp (nanoseconds since UNIX epoch) after which the packet times out. See https://golang.org/pkg/time/#Time.UnixNano at least one of timeout_height, timeout_timestamp is required",
"type": [
"integer",
"null"
Expand Down
9 changes: 6 additions & 3 deletions packages/std/src/ibc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ pub enum IbcMsg {
/// block height after which the packet times out.
/// at least one of timeout_height, timeout_timestamp is required
timeout_height: Option<IbcTimeoutHeight>,
/// block timestamp (in nanoseconds) after which the packet times out.
/// block timestamp (nanoseconds since UNIX epoch) after which the packet times out.
/// See https://golang.org/pkg/time/#Time.UnixNano
/// at least one of timeout_height, timeout_timestamp is required
timeout_timestamp: Option<u64>,
},
Expand All @@ -47,7 +48,8 @@ pub enum IbcMsg {
/// block height after which the packet times out.
/// at least one of timeout_height, timeout_timestamp is required
timeout_height: Option<IbcTimeoutHeight>,
/// block timestamp (in nanoseconds) after which the packet times out.
/// block timestamp (nanoseconds since UNIX epoch) after which the packet times out.
/// See https://golang.org/pkg/time/#Time.UnixNano
/// at least one of timeout_height, timeout_timestamp is required
timeout_timestamp: Option<u64>,
},
Expand Down Expand Up @@ -176,7 +178,8 @@ pub struct IbcPacket {
/// block height after which the packet times out.
/// at least one of timeout_height, timeout_timestamp is required
pub timeout_height: Option<IbcTimeoutHeight>,
/// block timestamp (in nanoseconds) after which the packet times out.
/// block timestamp (nanoseconds since UNIX epoch) after which the packet times out.
/// See https://golang.org/pkg/time/#Time.UnixNano
/// at least one of timeout_height, timeout_timestamp is required
pub timeout_timestamp: Option<u64>,
}
Expand Down

0 comments on commit a80f200

Please sign in to comment.