1
0

lnpeer: implement upfront shutdown script logic

Upfront shutdown script is a script provided on channel opening,
which will be used by the peer to enforce us closing to this script
on collaborative channel close.
This commit is contained in:
bitromortac
2020-12-18 11:06:42 +01:00
committed by ThomasV
parent e5458bb534
commit 6b90a2d36c
4 changed files with 110 additions and 7 deletions

View File

@@ -81,6 +81,7 @@ class Config(StoredObject):
initial_msat = attr.ib(type=int)
reserve_sat = attr.ib(type=int) # applies to OTHER ctx
htlc_minimum_msat = attr.ib(type=int) # smallest value for INCOMING htlc
upfront_shutdown_script = attr.ib(type=bytes, converter=hex_to_bytes)
def validate_params(self, *, funding_sat: int) -> None:
conf_name = type(self).__name__
@@ -300,6 +301,7 @@ class UnableToDeriveSecret(LightningError): pass
class HandshakeFailed(LightningError): pass
class ConnStringFormatError(LightningError): pass
class RemoteMisbehaving(LightningError): pass
class UpfrontShutdownScriptViolation(RemoteMisbehaving): pass
class NotFoundChanAnnouncementForUpdate(Exception): pass