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
Admittedly this is golang specific I guess so probably not a good idea to change the "default" encoder but leaving this here in case someone else stumbles across it.
i.e. Always set timestamps
The text was updated successfully, but these errors were encountered:
Tendermint/Comet BFT treats an undefined/unset Timestamp as a
time.Time
zero (checking againsttime.Time.isZero()
).This is
0001-01-01 00:00:00.000
.However, a
google.protobuf.Timestamp
with{ seconds: 0n, nanos: 0 }
as defined for undefined/unset here:https://github.com/confio/cosmjs-types/blob/main/src/google/protobuf/timestamp.ts#L104-L109
results in
1970-01-01 00:00:00.000
(UNIX epoch).The correct default should be:
{ seconds: -62135596800000n, nanos: 0 }
Admittedly this is golang specific I guess so probably not a good idea to change the "default" encoder but leaving this here in case someone else stumbles across it.
i.e. Always set timestamps
The text was updated successfully, but these errors were encountered: