tlnrouter: fix off-by-one in NUM_MAX_EDGES_IN_PAYMENT_PATH - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit d4da4aa56cd536e1066adaf2bd2691c27c3268a0 DIR parent 25c372a3e0c7d03ded5bb537e48cbe9337168014 HTML 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: M electrum/lnrouter.py | 2 +- M electrum/lnutil.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- DIR diff --git a/electrum/lnrouter.py b/electrum/lnrouter.py t@@ -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, DIR diff --git a/electrum/lnutil.py b/electrum/lnutil.py t@@ -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):