Skip to content

Commit

Permalink
fix(x/tx): fix int64 usage for 32 bit platforms (cosmos#15849)
Browse files Browse the repository at this point in the history
  • Loading branch information
kocubinski authored Apr 14, 2023
1 parent d6762e9 commit 209805b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions x/tx/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion x/tx/signing/aminojson/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 209805b

Please sign in to comment.