lnd icon indicating copy to clipboard operation
lnd copied to clipboard

fundingmanager: send out active channel ntfn on FundingLocked

Open Roasbeef opened this issue 6 years ago • 7 comments

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.

Roasbeef avatar Feb 06 '19 23:02 Roasbeef

travis failed, looks like we also need to initialize NotifyReadyChannelEvent in test_utils.go

cfromknecht avatar Feb 07 '19 00:02 cfromknecht

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

Roasbeef avatar Feb 07 '19 02:02 Roasbeef

Review ping @valentinewallace

Roasbeef avatar Aug 13 '19 01:08 Roasbeef

@Roasbeef do we want this for 0.11?

cfromknecht avatar Jun 18 '20 23:06 cfromknecht

@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.

Roasbeef avatar Jun 27 '20 00:06 Roasbeef

sgtm

cfromknecht avatar Jun 27 '20 05:06 cfromknecht

@roasbeef, remember to re-request review from reviewers when ready

lightninglabs-deploy avatar Sep 13 '22 07:09 lightninglabs-deploy

@roasbeef, remember to re-request review from reviewers when ready

lightninglabs-deploy avatar Nov 15 '22 12:11 lightninglabs-deploy

@roasbeef, remember to re-request review from reviewers when ready

lightninglabs-deploy avatar Jul 25 '23 11:07 lightninglabs-deploy

Closing due to inactivity

lightninglabs-deploy avatar Jul 28 '23 13:07 lightninglabs-deploy

Closing due to inactivity

lightninglabs-deploy avatar Jul 28 '23 14:07 lightninglabs-deploy

Closing due to inactivity

lightninglabs-deploy avatar Jul 28 '23 15:07 lightninglabs-deploy