From 807784a1c49cfc2442084fe499166713e7fd362c Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Sun, 26 Nov 2017 13:40:33 -0600 Subject: [PATCH] lnwallet: fix ChanReserve calculation in createTestChannels to be non-random --- lnwallet/channel_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lnwallet/channel_test.go b/lnwallet/channel_test.go index f851e821..91e3614d 100644 --- a/lnwallet/channel_test.go +++ b/lnwallet/channel_test.go @@ -230,7 +230,7 @@ func createTestChannels(revocationWindow int) (*LightningChannel, *LightningChan ChannelConstraints: channeldb.ChannelConstraints{ DustLimit: aliceDustLimit, MaxPendingAmount: lnwire.MilliSatoshi(rand.Int63()), - ChanReserve: btcutil.Amount(rand.Int63()), + ChanReserve: channelCapacity / 100, MinHTLC: lnwire.MilliSatoshi(rand.Int63()), MaxAcceptedHtlcs: uint16(rand.Int31()), }, @@ -245,7 +245,7 @@ func createTestChannels(revocationWindow int) (*LightningChannel, *LightningChan ChannelConstraints: channeldb.ChannelConstraints{ DustLimit: bobDustLimit, MaxPendingAmount: lnwire.MilliSatoshi(rand.Int63()), - ChanReserve: btcutil.Amount(rand.Int63()), + ChanReserve: channelCapacity / 100, MinHTLC: lnwire.MilliSatoshi(rand.Int63()), MaxAcceptedHtlcs: uint16(rand.Int31()), },