lnwallet: fix ChanReserve calculation in createTestChannels to be non-random
This commit is contained in:
parent
7d3e1308e4
commit
807784a1c4
@ -230,7 +230,7 @@ func createTestChannels(revocationWindow int) (*LightningChannel, *LightningChan
|
|||||||
ChannelConstraints: channeldb.ChannelConstraints{
|
ChannelConstraints: channeldb.ChannelConstraints{
|
||||||
DustLimit: aliceDustLimit,
|
DustLimit: aliceDustLimit,
|
||||||
MaxPendingAmount: lnwire.MilliSatoshi(rand.Int63()),
|
MaxPendingAmount: lnwire.MilliSatoshi(rand.Int63()),
|
||||||
ChanReserve: btcutil.Amount(rand.Int63()),
|
ChanReserve: channelCapacity / 100,
|
||||||
MinHTLC: lnwire.MilliSatoshi(rand.Int63()),
|
MinHTLC: lnwire.MilliSatoshi(rand.Int63()),
|
||||||
MaxAcceptedHtlcs: uint16(rand.Int31()),
|
MaxAcceptedHtlcs: uint16(rand.Int31()),
|
||||||
},
|
},
|
||||||
@ -245,7 +245,7 @@ func createTestChannels(revocationWindow int) (*LightningChannel, *LightningChan
|
|||||||
ChannelConstraints: channeldb.ChannelConstraints{
|
ChannelConstraints: channeldb.ChannelConstraints{
|
||||||
DustLimit: bobDustLimit,
|
DustLimit: bobDustLimit,
|
||||||
MaxPendingAmount: lnwire.MilliSatoshi(rand.Int63()),
|
MaxPendingAmount: lnwire.MilliSatoshi(rand.Int63()),
|
||||||
ChanReserve: btcutil.Amount(rand.Int63()),
|
ChanReserve: channelCapacity / 100,
|
||||||
MinHTLC: lnwire.MilliSatoshi(rand.Int63()),
|
MinHTLC: lnwire.MilliSatoshi(rand.Int63()),
|
||||||
MaxAcceptedHtlcs: uint16(rand.Int31()),
|
MaxAcceptedHtlcs: uint16(rand.Int31()),
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user