Skip to content

Commit 1341c89

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 1a554f4 commit 1341c89

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
@@ -376,6 +376,7 @@ func (c *ChanCloser) initChanShutdown() (*lnwire.Shutdown, error) {
376376
err := fn.MapOptionZ(c.cfg.AuxCloser, func(a AuxChanCloser) error {
377377
shutdownCustomRecords, err := a.ShutdownBlob(AuxShutdownReq{
378378
ChanPoint: c.chanPoint,
379+
ShortChanID: c.cfg.Channel.ShortChanID(),
379380
Initiator: c.cfg.Channel.IsInitiator(),
380381
InternalKey: c.localInternalKey,
381382
CommitBlob: c.cfg.Channel.LocalCommitmentBlob(),
@@ -979,7 +980,9 @@ func (c *ChanCloser) ReceiveClosingSigned( //nolint:funlen
979980
c.cfg.AuxCloser, func(aux AuxChanCloser) error {
980981
channel := c.cfg.Channel
981982
req := AuxShutdownReq{
982-
ChanPoint: c.chanPoint,
983+
ChanPoint: c.chanPoint,
984+
//nolint:lll
985+
ShortChanID: c.cfg.Channel.ShortChanID(),
983986
InternalKey: c.localInternalKey,
984987
Initiator: channel.IsInitiator(),
985988
//nolint:lll
@@ -1057,6 +1060,7 @@ func (c *ChanCloser) auxCloseOutputs(
10571060
err := fn.MapOptionZ(c.cfg.AuxCloser, func(aux AuxChanCloser) error {
10581061
req := AuxShutdownReq{
10591062
ChanPoint: c.chanPoint,
1063+
ShortChanID: c.cfg.Channel.ShortChanID(),
10601064
InternalKey: c.localInternalKey,
10611065
Initiator: c.cfg.Channel.IsInitiator(),
10621066
CommitBlob: c.cfg.Channel.LocalCommitmentBlob(),

0 commit comments

Comments
 (0)