Skip to content

Commit 008d29b

Browse files
Roasbeefguggero
authored andcommitted
lnwallet: add short chan ID to AuxShutdownReq
This allows implementations to obtain information related where the funding transaction confirmed in the mainchain.
1 parent 9fbf184 commit 008d29b

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
@@ -378,6 +378,7 @@ func (c *ChanCloser) initChanShutdown() (*lnwire.Shutdown, error) {
378378
err := fn.MapOptionZ(c.cfg.AuxCloser, func(a AuxChanCloser) error {
379379
shutdownCustomRecords, err := a.ShutdownBlob(AuxShutdownReq{
380380
ChanPoint: c.chanPoint,
381+
ShortChanID: c.cfg.Channel.ShortChanID(),
381382
Initiator: c.cfg.Channel.IsInitiator(),
382383
InternalKey: c.localInternalKey,
383384
CommitBlob: c.cfg.Channel.LocalCommitmentBlob(),
@@ -981,7 +982,9 @@ func (c *ChanCloser) ReceiveClosingSigned( //nolint:funlen
981982
c.cfg.AuxCloser, func(aux AuxChanCloser) error {
982983
channel := c.cfg.Channel
983984
req := AuxShutdownReq{
984-
ChanPoint: c.chanPoint,
985+
ChanPoint: c.chanPoint,
986+
//nolint:lll
987+
ShortChanID: c.cfg.Channel.ShortChanID(),
985988
InternalKey: c.localInternalKey,
986989
Initiator: channel.IsInitiator(),
987990
//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)