You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Timestamp::nanoseconds() method returns a u64 value, assuming that a Timestamp with a negative UNIX timestamp is never constructed. While Timestamp's own methods prevent this, a Timestamp can still be created from tendermint::Time.
The tendermint::Time struct can be constructed using the from_unix_timestamp method, which accepts an i64 for seconds. This allows negative values to be passed. As a result, Timestamp::nanoseconds() can panic when created from a tendermint::Time with negative values.
Version
<= v0.53.0
The text was updated successfully, but these errors were encountered:
Summary
The
Timestamp::nanoseconds()
method returns au64
value, assuming that aTimestamp
with a negative UNIX timestamp is never constructed. WhileTimestamp
's own methods prevent this, aTimestamp
can still be created fromtendermint::Time
.The
tendermint::Time
struct can be constructed using thefrom_unix_timestamp
method, which accepts ani64
for seconds. This allows negative values to be passed. As a result,Timestamp::nanoseconds()
can panic when created from atendermint::Time
with negative values.Version
<= v0.53.0
The text was updated successfully, but these errors were encountered: