commit d4da4aa56cd536e1066adaf2bd2691c27c3268a0
parent 25c372a3e0c7d03ded5bb537e48cbe9337168014
Author: SomberNight <somber.night@protonmail.com>
Date: Fri, 6 Sep 2019 18:36:21 +0200
lnrouter: fix off-by-one in NUM_MAX_EDGES_IN_PAYMENT_PATH
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/electrum/lnrouter.py b/electrum/lnrouter.py
@@ -175,7 +175,7 @@ class LNPathFinder(Logger):
if my_channels is None: my_channels = []
my_channels = {chan.short_channel_id: chan for chan in my_channels}
- # FIXME paths cannot be longer than 21 edges (onion packet)...
+ # FIXME paths cannot be longer than 20 edges (onion packet)...
# run Dijkstra
# The search is run in the REVERSE direction, from nodeB to nodeA,
diff --git a/electrum/lnutil.py b/electrum/lnutil.py
@@ -692,7 +692,7 @@ def generate_keypair(ln_keystore: BIP32_KeyStore, key_family: LnKeyFamily, index
NUM_MAX_HOPS_IN_PAYMENT_PATH = 20
-NUM_MAX_EDGES_IN_PAYMENT_PATH = NUM_MAX_HOPS_IN_PAYMENT_PATH + 1
+NUM_MAX_EDGES_IN_PAYMENT_PATH = NUM_MAX_HOPS_IN_PAYMENT_PATH
class ShortChannelID(bytes):