Skip to content

Commit

Permalink
lnwallet: fix constant overflow build issue on 32-bit systems
Browse files Browse the repository at this point in the history
This commit fixes a build issue that appears when attempting to
cross-compile binaries to a 32-bit system from a 64-bit system. The
issue was that the defined max-state hint overflows a 32-bit integer. To
fix this issue, we now proeprly specify a type of a uint64 for the typed
constant.
  • Loading branch information
Roasbeef committed Apr 7, 2017
1 parent 62ac716 commit 0858d8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lnwallet/script_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const (
// maxStateHint is the maximum state number we're able to encode using
// StateHintSize bytes amongst the sequence number and locktime fields
// of the commitment transaction.
maxStateHint = (1 << 48) - 1
maxStateHint uint64 = (1 << 48) - 1
)

// witnessScriptHash generates a pay-to-witness-script-hash public key script
Expand Down

0 comments on commit 0858d8a

Please sign in to comment.