1
0

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.
This commit is contained in:
bitromortac
2022-01-26 16:52:38 +01:00
committed by ThomasV
parent 9e800172ec
commit e2b1f6c6d5

View File

@@ -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