Browse Source

fix #5765

hard-fail-on-bad-server-string
ThomasV 5 years ago
parent
commit
47e0b4cd02
  1. 5
      electrum/gui/qt/main_window.py
  2. 4
      electrum/lnutil.py

5
electrum/gui/qt/main_window.py

@ -1394,10 +1394,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
amount_sat = self.amount_e.get_amount()
attempts = LN_NUM_PAYMENT_ATTEMPTS
def task():
try:
self.wallet.lnworker.pay(invoice, amount_sat, attempts)
except Exception as e:
self.show_error(str(e))
self.wallet.lnworker.pay(invoice, amount_sat, attempts)
self.do_clear()
self.wallet.thread.add(task)
self.invoice_list.update()

4
electrum/lnutil.py

@ -8,7 +8,7 @@ from collections import namedtuple
from typing import NamedTuple, List, Tuple, Mapping, Optional, TYPE_CHECKING, Union, Dict, Set
import re
from .util import bfh, bh2u, inv_dict
from .util import bfh, bh2u, inv_dict, UserFacingException
from .crypto import sha256
from .transaction import (Transaction, PartialTransaction, PartialTxInput, TxOutpoint,
PartialTxOutput, opcodes, TxOutput)
@ -118,13 +118,13 @@ class LightningError(Exception): pass
class LightningPeerConnectionClosed(LightningError): pass
class UnableToDeriveSecret(LightningError): pass
class HandshakeFailed(LightningError): pass
class PaymentFailure(LightningError): pass
class ConnStringFormatError(LightningError): pass
class UnknownPaymentHash(LightningError): pass
class RemoteMisbehaving(LightningError): pass
class NotFoundChanAnnouncementForUpdate(Exception): pass
class PaymentFailure(UserFacingException): pass
# TODO make some of these values configurable?
DEFAULT_TO_SELF_DELAY = 144

Loading…
Cancel
Save