Browse Source

lnworker: create_routes_for_payment: try random order

without this, we keep retrying with the same trampoline when payment fails
patch-4
ThomasV 3 years ago
parent
commit
ce96d1f97b
  1. 2
      electrum/lnworker.py

2
electrum/lnworker.py

@ -1532,6 +1532,8 @@ class LNWallet(LNWorker):
my_active_channels = [
chan for chan in self.channels.values() if
chan.is_active() and not chan.is_frozen_for_sending()]
# try random order
random.shuffle(my_active_channels)
try:
self.logger.info("trying single-part payment")
# try to send over a single channel

Loading…
Cancel
Save