lnrpc+rpcserver: add new fully resolved chan update event

This commit adds the new channel update event for a channel that is now
fully resolved to the event subscription RPC.
This commit is contained in:
Oliver Gugger
2021-08-09 13:55:34 +02:00
parent 5917486dc9
commit 06a693f10e
4 changed files with 1651 additions and 1606 deletions

View File

@@ -4062,6 +4062,19 @@ func (r *rpcServer) SubscribeChannelEvents(req *lnrpc.ChannelEventSubscription,
case channelnotifier.ActiveLinkEvent:
continue
case channelnotifier.FullyResolvedChannelEvent:
update = &lnrpc.ChannelEventUpdate{
Type: lnrpc.ChannelEventUpdate_FULLY_RESOLVED_CHANNEL,
Channel: &lnrpc.ChannelEventUpdate_FullyResolvedChannel{
FullyResolvedChannel: &lnrpc.ChannelPoint{
FundingTxid: &lnrpc.ChannelPoint_FundingTxidBytes{
FundingTxidBytes: event.ChannelPoint.Hash[:],
},
OutputIndex: event.ChannelPoint.Index,
},
},
}
default:
return fmt.Errorf("unexpected channel event update: %v", event)
}