diff --git a/x/tx/CHANGELOG.md b/x/tx/CHANGELOG.md index 2b5921d986..5a8fafb2a1 100644 --- a/x/tx/CHANGELOG.md +++ b/x/tx/CHANGELOG.md @@ -39,6 +39,9 @@ Ref: https://keepachangelog.com/en/1.0.0/ * `GetSignersOptions` has been renamed to `signing.Options` and requires `address.Codec`s for account and validator addresses * `GetSignersOptions.ProtoFiles` has been renamed to `signing.Options.FileResolver` +### Bug Fixes +* [#15849](https://github.com/cosmos/cosmos-sdk/pull/15849) Fix int64 usage for 32 bit platforms. + ## v0.5.1 ### Features diff --git a/x/tx/signing/aminojson/time.go b/x/tx/signing/aminojson/time.go index aa0ca9c84f..da02514c02 100644 --- a/x/tx/signing/aminojson/time.go +++ b/x/tx/signing/aminojson/time.go @@ -46,7 +46,7 @@ func marshalTimestamp(message protoreflect.Message, writer io.Writer) error { // MaxDurationSeconds the maximum number of seconds (when expressed as nanoseconds) which can fit in an int64. // gogoproto encodes google.protobuf.Duration as a time.Duration, which is 64-bit signed integer. -const MaxDurationSeconds = int64(math.MaxInt64/int(1e9)) - 1 +const MaxDurationSeconds = int64(math.MaxInt64)/1e9 - 1 func marshalDuration(message protoreflect.Message, writer io.Writer) error { fields := message.Descriptor().Fields()