Skip to content

Commit

Permalink
accounts: fix compilation issue for i386 systems
Browse files Browse the repository at this point in the history
Apparently the %d formatting directive implicitly uses `int` as its data
type, which on i386 systems is int32. So the value math.MaxInt64
overflows that value, which causes the compilation to fail.
  • Loading branch information
guggero committed Jan 23, 2025
1 parent 4a3a628 commit d63e07c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion accounts/store_kvdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func (s *BoltStore) IncreaseAccountBalance(_ context.Context, id AccountID,

update := func(account *OffChainBalanceAccount) error {
if amount > math.MaxInt64 {
return fmt.Errorf("amount %d exceeds the maximum of %d",
return fmt.Errorf("amount %d exceeds the maximum of %v",
amount, math.MaxInt64)
}

Expand Down

0 comments on commit d63e07c

Please sign in to comment.