Browse Source

lnutil: exceptions for LN protocol errors/warnings

The exceptions are meant to be raised in places where the BOLTs require
the sending of warning or error messages. They are necessary to handle
protocol failures occuring helper functions that check constraints.
patch-4
bitromortac 3 years ago
committed by ThomasV
parent
commit
e2b1f6c6d5
  1. 10
      electrum/lnutil.py

10
electrum/lnutil.py

@ -362,6 +362,16 @@ class NoPathFound(PaymentFailure):
def __str__(self):
return _('No path found')
class LNProtocolError(Exception):
"""Raised in peer methods to trigger an error message."""
class LNProtocolWarning(Exception):
"""Raised in peer methods to trigger a warning message."""
# TODO make some of these values configurable?
REDEEM_AFTER_DOUBLE_SPENT_DELAY = 30

Loading…
Cancel
Save