Skip to content

Commit 6af629f

Browse files
yyforyongyuguggero
authored andcommitted
lndclient: add channel event FullyResolvedChannelUpdate
1 parent 0ce0c7d commit 6af629f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

lightning_client.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,10 @@ const (
450450
// InactiveChannelUpdate indicates that the channel event holds
451451
// information about a channel that became inactive.
452452
InactiveChannelUpdate
453+
454+
// FullyResolvedChannelUpdate indicates that the channel event holds
455+
// information about a channel has been fully closed.
456+
FullyResolvedChannelUpdate
453457
)
454458

455459
// ChannelEventUpdate holds the data fields and type for a particular channel
@@ -2393,6 +2397,19 @@ func (s *lightningClient) getChannelEventUpdate(
23932397
return nil, err
23942398
}
23952399

2400+
case lnrpc.ChannelEventUpdate_FULLY_RESOLVED_CHANNEL:
2401+
result.UpdateType = FullyResolvedChannelUpdate
2402+
channelPoint := rpcChannelEventUpdate.GetFullyResolvedChannel()
2403+
fundingTxID := channelPoint.FundingTxid.(*lnrpc.ChannelPoint_FundingTxidBytes)
2404+
2405+
result.ChannelPoint, err = getOutPoint(
2406+
fundingTxID.FundingTxidBytes,
2407+
channelPoint.OutputIndex,
2408+
)
2409+
if err != nil {
2410+
return nil, err
2411+
}
2412+
23962413
default:
23972414
return nil, fmt.Errorf("unhandled update type: %v",
23982415
rpcChannelEventUpdate.Type.String())

0 commit comments

Comments
 (0)