routing+lnrpc: make capacity factor configurable

We make the capacity factor configurable via an lnd.conf routerrpc
apriori parameter. The capacity factor trades off increased success
probability with a reduced set of channel candidates, which may lead to
increased fees. To let users choose whether the factor is active or not,
we add a config setting where a capacity fraction of 1.0 disables the
factor. We limit the capacity fraction to values between 0.75 and 1.0.
Lower values may discard too many channels.
This commit is contained in:
bitromortac committed 2023-02-24 15:28:55 +01:00
1 parent 73596ceac2
commit a73581610e
10 files changed
+113 -47

No files matched your search

+3
View File
@@ -63,6 +63,9 @@ type AprioriConfig struct {
// PenaltyHalfLife defines after how much time a penalized node or
// channel is back at 50% probability.
PenaltyHalfLife time.Duration `long:"penaltyhalflife" description:"Defines the duration after which a penalized node or channel is back at 50% probability"`
// CapacityFraction defines the fraction of channels' capacities that is considered liquid.
CapacityFraction float64 `long:"capacityfraction" description:"Defines the fraction of channels' capacities that is considered liquid. Valid values are in [0.75, 1]."`
}
// BimodalConfig defines parameters for the bimodal probability.