mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-05 17:05:50 +02:00
routing: add capacity to special edges
Having a capacity available is important for liquidity estimation. * We add a dummy capacity to hop hints. Hop hints specify neither the capacity nor a maxHTLC size, which is why we assume the channel to have a high capacity relative to the amount we send. * We add a capacity to local edges. These channels should always have a capacity associated with them, even in the neutrino case (a fallback to maxHTLC is not necessary). This is just for completeness, as the probability calculation for local channels is done separately.
This commit is contained in:
@@ -28,9 +28,12 @@ const (
|
||||
// the timescale of about a week.
|
||||
DefaultBimodalDecayTime = 7 * 24 * time.Hour
|
||||
|
||||
// BimodalScaleMsatLimit is the maximum value for BimodalScaleMsat to
|
||||
// avoid numerical issues.
|
||||
BimodalScaleMsatMax = lnwire.MilliSatoshi(21e17)
|
||||
// BimodalScaleMsatMax is the maximum value for BimodalScaleMsat. We
|
||||
// limit it here to the fakeHopHintCapacity to avoid issues with hop
|
||||
// hint probability calculations.
|
||||
BimodalScaleMsatMax = lnwire.MilliSatoshi(
|
||||
1000 * fakeHopHintCapacity / 4,
|
||||
)
|
||||
|
||||
// BimodalEstimatorName is used to identify the bimodal estimator.
|
||||
BimodalEstimatorName = "bimodal"
|
||||
|
Reference in New Issue
Block a user