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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user