From 0858d8a17d17a013c0c63e8a7ffaa3bdef0cd03a Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Fri, 7 Apr 2017 18:05:04 +0200 Subject: [PATCH] lnwallet: fix constant overflow build issue on 32-bit systems 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. --- lnwallet/script_utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnwallet/script_utils.go b/lnwallet/script_utils.go index 9cfb1a4f..9f189197 100644 --- a/lnwallet/script_utils.go +++ b/lnwallet/script_utils.go @@ -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