fundingmanager: send out active channel ntfn on FundingLocked
In this commit, we fix a small gap in the existing notification logic.
Before this commit, if by the time we added a link to the switch, we
hadn't yet processed the FundingLocked message, then we wouldn't mark
the link as fully active. To remedy that, we extend the role of the
fundingManager to notify once the channel is "ready".
It's worth noting that with this fix, we can emit duplicate active
channel notifications. However, as this RPC is meant to be used primary
for UIs, I think it's an acceptable tradeoff, we can extend the
ChannelNotifier to maintain state to suppress duplicate notifications.
travis failed, looks like we also need to initialize NotifyReadyChannelEvent in test_utils.go
itests fail now since a duplicate update can be sent:
--- FAIL: TestLightningNetworkDaemon/multiple_channel_creation_and_update_subscription (3.41s)
lnd_test.go:75: Failed: (multiple channel creation and update subscription): exited with error:
*errors.errorString errored verifying close updates: channel update channel of wrong type, expected closed channel, got *lnrpc.ChannelEventUpdate_ActiveChannel
cc @valentinewallace
Review ping @valentinewallace
@Roasbeef do we want this for 0.11?
@cfromknecht with the latest changes in the switch, I think this should be done there instead as you mentioned above. I'm going to move this from the milestone for now, as we have higher priority items we'd like to land for the upcoming major release.
sgtm
@roasbeef, remember to re-request review from reviewers when ready
@roasbeef, remember to re-request review from reviewers when ready
@roasbeef, remember to re-request review from reviewers when ready
Closing due to inactivity
Closing due to inactivity
Closing due to inactivity