mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-09 19:14:32 +02:00
fundingmanager+lnd: propose remote channel reserve above dust limit
This commit is contained in:
15
lnd.go
15
lnd.go
@@ -464,11 +464,20 @@ func lndMain() error {
|
||||
cid := lnwire.NewChanIDFromOutPoint(&chanPoint)
|
||||
return server.htlcSwitch.UpdateShortChanID(cid)
|
||||
},
|
||||
RequiredRemoteChanReserve: func(chanAmt btcutil.Amount) btcutil.Amount {
|
||||
RequiredRemoteChanReserve: func(chanAmt,
|
||||
dustLimit btcutil.Amount) btcutil.Amount {
|
||||
|
||||
// By default, we'll require the remote peer to maintain
|
||||
// at least 1% of the total channel capacity at all
|
||||
// times.
|
||||
return chanAmt / 100
|
||||
// times. If this value ends up dipping below the dust
|
||||
// limit, then we'll use the dust limit itself as the
|
||||
// reserve as required by BOLT #2.
|
||||
reserve := chanAmt / 100
|
||||
if reserve < dustLimit {
|
||||
reserve = dustLimit
|
||||
}
|
||||
|
||||
return reserve
|
||||
},
|
||||
RequiredRemoteMaxValue: func(chanAmt btcutil.Amount) lnwire.MilliSatoshi {
|
||||
// By default, we'll allow the remote peer to fully
|
||||
|
Reference in New Issue
Block a user