From 812ebe6fe6f500ba790d4746190d4cb8c536c27c Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 31 Jul 2017 21:02:22 -0700 Subject: [PATCH] lnwallet: type htlcWeight and commitWeight as int64's --- lnwallet/reservation.go | 2 +- lnwallet/wallet.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lnwallet/reservation.go b/lnwallet/reservation.go index 8aef594c..31eb58db 100644 --- a/lnwallet/reservation.go +++ b/lnwallet/reservation.go @@ -143,7 +143,7 @@ func NewChannelReservation(capacity, fundingAmt, feePerKw btcutil.Amount, initiator bool ) - commitFee := (feePerKw * commitWeight) / 1000 + commitFee := btcutil.Amount((int64(feePerKw) * commitWeight) / 1000) // If we're the responder to a single-funder reservation, then we have // no initial balance in the channel unless the remote party is pushing diff --git a/lnwallet/wallet.go b/lnwallet/wallet.go index 6f785498..fb61d8d3 100644 --- a/lnwallet/wallet.go +++ b/lnwallet/wallet.go @@ -39,8 +39,8 @@ const ( // rotations, etc. identityKeyIndex = hdkeychain.HardenedKeyStart + 2 - commitWeight = btcutil.Amount(724) - htlcWeight = 172 + commitWeight int64 = 724 + htlcWeight int64 = 172 ) var (