mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-13 12:32:48 +02:00
lnd: handle channel update events in SubscribeChannelEvents
This commit is contained in:
parent
4f22a5130d
commit
10e8a69cec
1 changed files with 18 additions and 0 deletions
18
rpcserver.go
18
rpcserver.go
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue