lnwallet: fix ChanReserve calculation in createTestChannels to be non-random

This commit is contained in:
Olaoluwa Osuntokun 2017-11-26 13:40:33 -06:00
parent 7d3e1308e4
commit 807784a1c4
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21
1 changed files with 2 additions and 2 deletions

View File

@ -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()),
},