channeldb: Add upfront shutdown script to OpenChannel
This commit adds fields for upfront shutdown scripts set by the local and remote peer to the OpenChannel struct. These values are optional, so they are added with their own keys in the chanBucket in the DB.
This commit is contained in:
3 files changed
+181
-4
No files matched your search
+2
-2
@@ -4921,13 +4921,13 @@ func (lc *LightningChannel) ShortChanID() lnwire.ShortChannelID {
|
||||
// LocalUpfrontShutdownScript returns the local upfront shutdown script for the
|
||||
// channel. If it was not set, an empty byte array is returned.
|
||||
func (lc *LightningChannel) LocalUpfrontShutdownScript() lnwire.DeliveryAddress {
|
||||
return nil
|
||||
return lc.channelState.LocalShutdownScript
|
||||
}
|
||||
|
||||
// RemoteUpfrontShutdownScript returns the remote upfront shutdown script for the
|
||||
// channel. If it was not set, an empty byte array is returned.
|
||||
func (lc *LightningChannel) RemoteUpfrontShutdownScript() lnwire.DeliveryAddress {
|
||||
return nil
|
||||
return lc.channelState.RemoteShutdownScript
|
||||
}
|
||||
|
||||
// genHtlcScript generates the proper P2WSH public key scripts for the HTLC
|
||||
|
||||
Reference in new issue
Block a user