mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 14:40:51 +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:
@@ -218,7 +218,10 @@ func (u *edgeUnifier) getEdgeLocal(amt lnwire.MilliSatoshi,
|
||||
maxBandwidth = bandwidth
|
||||
|
||||
// Update best edge.
|
||||
bestEdge = &unifiedEdge{policy: edge.policy}
|
||||
bestEdge = &unifiedEdge{
|
||||
policy: edge.policy,
|
||||
capacity: edge.capacity,
|
||||
}
|
||||
}
|
||||
|
||||
return bestEdge
|
||||
|
Reference in New Issue
Block a user