1
0

lnrouter+lnworker: use liquidity hints

Adds liquidity hints for the sending capabilities of routing channels in the
graph. The channel blacklist is incorporated into liquidity hints.
Liquidity hints are updated when a payment fails with a temporary
channel failure or when it succeeds. Liquidity hints are used to give a
penalty in the _edge_cost heuristics used by the pathfinding algorithm.
The base penalty in (_edge_cost) is removed because it is now part of the
liquidity penalty. We don't return early from get_distances, as we want
to explore all channels.
This commit is contained in:
bitromortac
2021-03-09 08:47:30 +01:00
parent 209449bec4
commit 4df67a4f78
7 changed files with 418 additions and 60 deletions

View File

@@ -1089,7 +1089,7 @@ class Commands:
@command('n')
async def clear_ln_blacklist(self):
self.network.path_finder.blacklist.clear()
self.network.path_finder.liquidity_hints.clear_blacklist()
@command('w')
async def list_invoices(self, wallet: Abstract_Wallet = None):