lnd: handle channel update events in SubscribeChannelEvents

This commit is contained in:
bitromortac 2025-09-23 10:37:27 +02:00
parent 4f22a5130d
commit 10e8a69cec
No known key found for this signature in database
GPG key ID: 1965063FC13BEBE2

View file

@ -5488,6 +5488,24 @@ func (r *rpcServer) SubscribeChannelEvents(req *lnrpc.ChannelEventSubscription,
},
}
case channelnotifier.ChannelUpdateEvent:
channel, err := createRPCOpenChannel(
updateStream.Context(),
r, event.Channel, true, false,
)
if err != nil {
return err
}
update = &lnrpc.ChannelEventUpdate{
Type: lnrpc.ChannelEventUpdate_CHANNEL_UPDATE,
Channel: &lnrpc.ChannelEventUpdate_UpdatedChannel{
UpdatedChannel: &lnrpc.ChannelCommitUpdate{
Channel: channel,
},
},
}
case channelnotifier.InactiveChannelEvent:
update = &lnrpc.ChannelEventUpdate{
Type: lnrpc.ChannelEventUpdate_INACTIVE_CHANNEL,