lnrouter: fix off-by-one in NUM_MAX_EDGES_IN_PAYMENT_PATH
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user