lnwallet: make 1% reservation computation clearer
Adding 99 here didn’t really do anything but obfuscate when we were trying to compute. We’re just using internet division to calculate 1% of the channel capacity amount. This is the amount that the remote party must remain above at all times.
This commit is contained in:
parent
24ad3e17de
commit
91bb95991e
@ -288,9 +288,10 @@ func (r *ChannelReservation) RemoteChanConstraints() (btcutil.Amount, lnwire.Mil
|
||||
|
||||
// TODO(roasbeef): move csv delay calculation into func?
|
||||
|
||||
// By default, we'll require them to maintain at least 1% of thee total
|
||||
// channel capacity at all times.
|
||||
chanReserve := (chanCapacity + 99) / 100
|
||||
// By default, we'll require them to maintain at least 1% of the total
|
||||
// channel capacity at all times. This is the absolute amount the
|
||||
// settled balance of the remote party must be above at *all* times.
|
||||
chanReserve := (chanCapacity) / 100
|
||||
|
||||
// We'll allow them to fully utilize the full bandwidth of the channel,
|
||||
// minus our required reserve.
|
||||
|
Loading…
Reference in New Issue
Block a user