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:
@@ -62,7 +62,6 @@ from .version import PROTOCOL_VERSION
|
||||
from .simple_config import SimpleConfig
|
||||
from .i18n import _
|
||||
from .logging import get_logger, Logger
|
||||
from .lnutil import ChannelBlackList
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .channel_db import ChannelDB
|
||||
@@ -350,7 +349,6 @@ class Network(Logger, NetworkRetryManager[ServerAddr]):
|
||||
self._has_ever_managed_to_connect_to_server = False
|
||||
|
||||
# lightning network
|
||||
self.channel_blacklist = ChannelBlackList()
|
||||
if self.config.get('run_watchtower', False):
|
||||
from . import lnwatcher
|
||||
self.local_watchtower = lnwatcher.WatchTower(self)
|
||||
|
||||
Reference in New Issue
Block a user