mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-26 17:52:25 +01:00
lnwallet: add short chan ID to AuxShutdownReq
This allows implementations to obtain information related where the funding transaction confirmed in the mainchain.
This commit is contained in:
parent
9eec9b5045
commit
c7011a6a5c
@ -34,6 +34,10 @@ type AuxShutdownReq struct {
|
||||
// down.
|
||||
ChanPoint wire.OutPoint
|
||||
|
||||
// ShortChanID is the short channel ID of the channel that is being
|
||||
// closed.
|
||||
ShortChanID lnwire.ShortChannelID
|
||||
|
||||
// Initiator is true if the local node is the initiator of the channel.
|
||||
Initiator bool
|
||||
|
||||
|
@ -375,6 +375,7 @@ func (c *ChanCloser) initChanShutdown() (*lnwire.Shutdown, error) {
|
||||
err := fn.MapOptionZ(c.cfg.AuxCloser, func(a AuxChanCloser) error {
|
||||
shutdownCustomRecords, err := a.ShutdownBlob(AuxShutdownReq{
|
||||
ChanPoint: c.chanPoint,
|
||||
ShortChanID: c.cfg.Channel.ShortChanID(),
|
||||
Initiator: c.cfg.Channel.IsInitiator(),
|
||||
InternalKey: c.localInternalKey,
|
||||
CommitBlob: c.cfg.Channel.LocalCommitmentBlob(),
|
||||
@ -978,7 +979,9 @@ func (c *ChanCloser) ReceiveClosingSigned( //nolint:funlen
|
||||
c.cfg.AuxCloser, func(aux AuxChanCloser) error {
|
||||
channel := c.cfg.Channel
|
||||
req := AuxShutdownReq{
|
||||
ChanPoint: c.chanPoint,
|
||||
ChanPoint: c.chanPoint,
|
||||
//nolint:lll
|
||||
ShortChanID: c.cfg.Channel.ShortChanID(),
|
||||
InternalKey: c.localInternalKey,
|
||||
Initiator: channel.IsInitiator(),
|
||||
//nolint:lll
|
||||
@ -1059,6 +1062,7 @@ func (c *ChanCloser) auxCloseOutputs(
|
||||
err := fn.MapOptionZ(c.cfg.AuxCloser, func(aux AuxChanCloser) error {
|
||||
req := AuxShutdownReq{
|
||||
ChanPoint: c.chanPoint,
|
||||
ShortChanID: c.cfg.Channel.ShortChanID(),
|
||||
InternalKey: c.localInternalKey,
|
||||
Initiator: c.cfg.Channel.IsInitiator(),
|
||||
CommitBlob: c.cfg.Channel.LocalCommitmentBlob(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user