Browse Source

lnworker: don't log InvoiceError

lnworker._pay does not need log_exceptions decorator,
as we properly await the coroutine
hard-fail-on-bad-server-string
SomberNight 5 years ago
parent
commit
daef1a8359
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 1
      electrum/lnworker.py
  2. 4
      electrum/util.py

1
electrum/lnworker.py

@ -892,7 +892,6 @@ class LNWallet(LNWorker):
if chan.short_channel_id == short_channel_id:
return chan
@log_exceptions
async def _pay(self, invoice, amount_sat=None, attempts=1) -> bool:
lnaddr = self._check_invoice(invoice, amount_sat)
payment_hash = lnaddr.paymenthash

4
electrum/util.py

@ -183,7 +183,9 @@ class BitcoinException(Exception): pass
class UserFacingException(Exception):
"""Exception that contains information intended to be shown to the user."""
class InvoiceError(Exception): pass
class InvoiceError(UserFacingException): pass
# Throw this exception to unwind the stack like when an error occurs.
# However unlike other exceptions the user won't be informed.

Loading…
Cancel
Save