Browse Source

lnrouter: fix off-by-one in NUM_MAX_EDGES_IN_PAYMENT_PATH

dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
SomberNight 5 years ago
parent
commit
d4da4aa56c
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 2
      electrum/lnrouter.py
  2. 2
      electrum/lnutil.py

2
electrum/lnrouter.py

@ -175,7 +175,7 @@ class LNPathFinder(Logger):
if my_channels is None: my_channels = [] if my_channels is None: my_channels = []
my_channels = {chan.short_channel_id: chan for chan in 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 # run Dijkstra
# The search is run in the REVERSE direction, from nodeB to nodeA, # The search is run in the REVERSE direction, from nodeB to nodeA,

2
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_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): class ShortChannelID(bytes):

Loading…
Cancel
Save