Skip to content

Commit 8d83880

Browse files
authored
Merge pull request #8885 from lightningnetwork/co-op-close-scid
lnwallet: add short chan ID to AuxShutdownReq
2 parents 9eec9b5 + c7011a6 commit 8d83880

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

lnwallet/chancloser/aux_closer.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ type AuxShutdownReq struct {
3434
// down.
3535
ChanPoint wire.OutPoint
3636

37+
// ShortChanID is the short channel ID of the channel that is being
38+
// closed.
39+
ShortChanID lnwire.ShortChannelID
40+
3741
// Initiator is true if the local node is the initiator of the channel.
3842
Initiator bool
3943

lnwallet/chancloser/chancloser.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ func (c *ChanCloser) initChanShutdown() (*lnwire.Shutdown, error) {
375375
err := fn.MapOptionZ(c.cfg.AuxCloser, func(a AuxChanCloser) error {
376376
shutdownCustomRecords, err := a.ShutdownBlob(AuxShutdownReq{
377377
ChanPoint: c.chanPoint,
378+
ShortChanID: c.cfg.Channel.ShortChanID(),
378379
Initiator: c.cfg.Channel.IsInitiator(),
379380
InternalKey: c.localInternalKey,
380381
CommitBlob: c.cfg.Channel.LocalCommitmentBlob(),
@@ -978,7 +979,9 @@ func (c *ChanCloser) ReceiveClosingSigned( //nolint:funlen
978979
c.cfg.AuxCloser, func(aux AuxChanCloser) error {
979980
channel := c.cfg.Channel
980981
req := AuxShutdownReq{
981-
ChanPoint: c.chanPoint,
982+
ChanPoint: c.chanPoint,
983+
//nolint:lll
984+
ShortChanID: c.cfg.Channel.ShortChanID(),
982985
InternalKey: c.localInternalKey,
983986
Initiator: channel.IsInitiator(),
984987
//nolint:lll
@@ -1059,6 +1062,7 @@ func (c *ChanCloser) auxCloseOutputs(
10591062
err := fn.MapOptionZ(c.cfg.AuxCloser, func(aux AuxChanCloser) error {
10601063
req := AuxShutdownReq{
10611064
ChanPoint: c.chanPoint,
1065+
ShortChanID: c.cfg.Channel.ShortChanID(),
10621066
InternalKey: c.localInternalKey,
10631067
Initiator: c.cfg.Channel.IsInitiator(),
10641068
CommitBlob: c.cfg.Channel.LocalCommitmentBlob(),

0 commit comments

Comments
 (0)