Commit Graph

5 Commits

Author SHA1 Message Date
bitromortac
7df1482cfc
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.
2023-03-23 11:12:10 +01:00
yyforyongyu
6618ab493a
multi: enhance loggings and fix logging format
Also adds TODO for a possible bug.
2023-02-23 21:56:08 +08:00
bitromortac
2b6308a61f
routing: implement capacity in getEdge
This commit adds the maximal capacity between two nodes to the unified
edge data. We use MaxHTLC as a replacement if the channel capacity is
not available.

In tests we use larger maxHTLC values to be able to convert to a
non-zero sat capacity.
2022-12-12 13:22:28 +01:00
bitromortac
99273cc5e1
lntypes+routing: add generic Min/Max functions 2022-12-12 13:22:28 +01:00
bitromortac
76e711ead0
routing: refactor unified policies to edges
This commit refactors the semantics of unified policies to unified
edges. The main changes are the following renamings:

* unifiedPolicies -> nodeEdgeUnifier
* unifiedPolicy -> edgeUnifier
* unifiedPolicyEdge -> unifiedEdge

Comments and shortened variable names are changed to reflect the new
semantics.
2022-12-12 13:22:26 +01:00