New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
funding: decouple funding wait from fundingLocked and chanAnn #319
funding: decouple funding wait from fundingLocked and chanAnn #319
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! The funding flow code definitely needs some refactoring 😆 I'll try to answer the questions you have 😄
-
See comments inline, I think this is close to what we want, but it should also be decoupled from
waitForFundingWithTimeout
. -
The spec says that
If sent, announcement_signatures messages MUST NOT be sent until [...] the funding transaction is has at least 6 confirmations.
So I believe in this case we should actually wait for at least six confirmations.
Looking at *fundingConfig.NumRequiredConfs
I think this is meant as a method to determine our preferred minimum_depth
for the accept_channel
message:
https://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md#the-accept_channel-message.
This basically determine how many blocks we want the funding confirmation to have before we send funding_locked
. This is different from the announcement message minimum confirmations:
https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md#the-announcement_signatures-message, but as you can see it also requires the funding_locked
to have been sent, meaning it will indirectly require max(numConfs, 6)
confirmations.
fundingmanager.go
Outdated
// Successfully received confirmation details | ||
// from waitForFundingConfirmation. Now we | ||
// we wait to receive from doneChan. | ||
case <-doneChan: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need two channels here, the confirmChan
should be enough.
fundingmanager.go
Outdated
// The funding tx has the correct number of confirmations, | ||
// so we can now broadcast the channel announcement messages | ||
// to the greater network. | ||
f.announceChannelAfterConfirmations(completeChan, confDetails) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be done outside waitForFundingWithTimeout
fundingmanager.go
Outdated
// Finally, the fundingLocked message is sent to the peer and the channel is announced | ||
// to the greater network. This method should be called only after waitForFundingConfirmation | ||
// completes successfully. | ||
func (f *fundingManager) announceChannelAfterConfirmations( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before announcing the channel, this method marks the channel opened in the db, and sends the fundingLocked
message to the peer, so I think the name is a bit misleading. Maybe something like processConfirmedFunding
could be more telling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, I actually had trouble coming up with a name for this...
Thanks for the comments, especially re: confirmations stuff. I was a bit confused by the mention of confirmations for different messages, but I get it now. I'm going to rework it and update the PR today most likely. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, getting very close I think! 💯
The 6 confirmations check should be done here: https://github.com/lightningnetwork/lnd/pull/319/files#diff-691ca64693e704fd2e5080998f3e640eR1457
I think it should also be fairly easy to add a test for this to fundingmanager_test.go
fundingmanager.go
Outdated
// Success, funding transaction was confirmed. | ||
case err = <-errChan: | ||
// Encountered an error | ||
fndgLog.Errorf("Encountered an error") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log the actual error
fundingmanager.go
Outdated
case <-doneChan: | ||
case err := <-errChan: | ||
// Encountered an error | ||
fndgLog.Errorf("Encountered an error: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better text here is "error waiting for funding transaction to confirm: %v"
fundingmanager.go
Outdated
// Success, funding transaction was confirmed. | ||
f.deleteReservationCtx(peerKey, | ||
fmsg.msg.PendingChannelID) | ||
// Now we can call processConfirmedFunding | ||
f.processConfirmedFunding(completeChan, confDetails) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this must be done before the reservation context is deleted, to keep the original behavior.
fundingmanager.go
Outdated
}() | ||
|
||
select { | ||
case <-f.quit: | ||
return | ||
case <-doneChan: | ||
case err := <-errChan: | ||
fndgLog.Errorf("Encountered an error: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
fundingmanager.go
Outdated
@@ -1200,32 +1222,35 @@ func (f *fundingManager) handleFundingSigned(fmsg *fundingSignedMsg) { | |||
// passed from bestHeight. In the case of timeout, the timeoutChan will be | |||
// closed. In case of confirmation or error, doneChan will be closed. | |||
func (f *fundingManager) waitForFundingWithTimeout(completeChan *channeldb.OpenChannel, | |||
doneChan chan<- struct{}, timeoutChan chan<- struct{}) { | |||
errChan chan<- error, timeoutChan chan<- struct{}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe have the channels in this order: confirmChan, timeoutChan, errChan? :)
fundingmanager.go
Outdated
cancelChan <-chan struct{}, doneChan chan<- struct{}) { | ||
|
||
defer close(doneChan) | ||
cancelChan <-chan struct{}, errChan chan<- error, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
order: cancelChan, confirmChan, errChan
fundingmanager.go
Outdated
|
||
// Register with the ChainNotifier for a notification once the funding | ||
// transaction reaches `numConfs` confirmations. | ||
txid := completeChan.FundingOutpoint.Hash | ||
numConfs := uint32(completeChan.NumConfsRequired) | ||
if (numConfs < 6) { | ||
numConfs = 6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be wrong. This will prevent the fundingLocked
being sent with < 6 confirmations, which is not what we want. This check should be done after fundingLocked
is sent.
fundingmanager.go
Outdated
@@ -1310,6 +1344,20 @@ func (f *fundingManager) waitForFundingConfirmation(completeChan *channeldb.Open | |||
return | |||
} | |||
|
|||
// Send confirmation details to confirmChan for use in processConfirmedFunding | |||
confirmChan <- confDetails |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this together with the !ok
check inside the select
36f3cc3
to
e377d0c
Compare
I believe that I have successfully decoupled I still have some concerns:
|
My recent changes also include the first steps to a fix for issue #306. I added ChannelFlags to the OpenChannel struct and have specific methods for putting, fetching, & deleting ChannelFlags in |
I added a My main obstacle that I must tackle before this is completed is that to have a functional channel graph where users can send payments to one another, both edges in a channel must be defined. Channels are bidirectional. It is trivial to send OUR data ( Additionally, what channel info is added in the case of |
@halseth suggested splitting this PR into multiple PRs. The current PR now only contains the decoupling of sending the fundingLocked message and the sending of the channel announcement from |
a1f8fb5
to
14e9aed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Only stylistic nits from me at this point.
Please also update the PR description to what parts of the issue this currently is handling, and what will be done in a follow-up PR.
Also, if you take a look at the contribution guidelines and earlier commits, you can see how commit messages should be formatted. Thanks!
fundingmanager.go
Outdated
} | ||
defer lnChannel.Stop() | ||
|
||
if err = f.sendFundingLocked(ch, lnChannel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might fit on one line if you do
err = f.sendFundingLocked( ...
if err != nil {
...
fundingmanager.go
Outdated
"fundingLocked: %v", err) | ||
return | ||
} | ||
if err = f.sendChannelAnnouncement(ch, lnChannel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
fundingmanager.go
Outdated
} | ||
defer lnChannel.Stop() | ||
|
||
if err = f.sendFundingLocked(channel, lnChannel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
fundingmanager.go
Outdated
"fundingLocked: %v", err) | ||
return | ||
} | ||
if err = f.sendChannelAnnouncement(channel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
fundingmanager.go
Outdated
f.sendFundingLockedAndAnnounceChannel(channel, | ||
shortChanID) | ||
|
||
// With the channel marked open, we'll create |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably redundant comment
fundingmanager.go
Outdated
fndgLog.Errorf("Failed to send fundingLocked: %v", err) | ||
return | ||
} | ||
if err = f.sendChannelAnnouncement(completeChan, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
fundingmanager.go
Outdated
} | ||
defer lnChannel.Stop() | ||
|
||
if err = f.sendFundingLocked(completeChan, lnChannel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
fundingmanager.go
Outdated
@@ -1230,21 +1342,21 @@ func (f *fundingManager) handleFundingSigned(fmsg *fundingSignedMsg) { | |||
// waitForFundingWithTimeout is a wrapper around waitForFundingConfirmation that | |||
// will cancel the wait for confirmation if maxWaitNumBlocksFundingConf has | |||
// passed from bestHeight. In the case of timeout, the timeoutChan will be | |||
// closed. In case of confirmation or error, doneChan will be closed. | |||
// closed. In case of confirmation or error, confChan will be closed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update comment to reflect the returned value on success
fundingmanager.go
Outdated
@@ -1297,9 +1414,9 @@ func (f *fundingManager) waitForFundingWithTimeout(completeChan *channeldb.OpenC | |||
// when a channel has become active for lightning transactions. | |||
// The wait can be canceled by closing the cancelChan. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add confChan
to comment
fundingmanager.go
Outdated
@@ -2105,4 +2211,4 @@ func (f *fundingManager) deleteChannelOpeningState(chanPoint *wire.OutPoint) err | |||
} | |||
return nil | |||
}) | |||
} | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add back newline
38331d4
to
e004e10
Compare
dd77c4f
to
3791a7d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now 👍
fundingmanager.go
Outdated
case <-doneChan: | ||
case shortChanID, ok := <-confChan: | ||
if !ok { | ||
fndgLog.Errorf("confChan was closed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better error message here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed that the build is failing. Looks like you must run gofmt -s
on the changed files.
73fdb6f
to
3b724d5
Compare
b4b6d10
to
65d4936
Compare
fundingmanager.go
Outdated
close(doneChan) | ||
case shortChanID, ok := <-waitingConfChan: | ||
if !ok { | ||
fndgLog.Errorf("waiting for funding confirmation" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is getting logged twice, both here and in Start. I would drop this log line and just close & return here.
fundingmanager.go
Outdated
// With the channel marked open, we'll create the | ||
// state-machine object which wraps the database | ||
// state. | ||
lnChannel, err := lnwallet.NewLightningChannel( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is only part 1 of a two-part change, but this chunk of code is now repeated 4 times. I think it makes more sense to keep it in its own method for now, and the method name sendFundingLockedAndAnnounceChannel
is still appropriate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with all of the suggested changes besides sendFundingLockedAndAnnounceChannel
because my later PR will have complicated logic that is better off from having them decoupled. There is a branch of code which ONLY sends the announcement, but not the funding locked message (this code branch needs to add the channel to the channel graph before announcement). The issue says to include adding to the channel router graph immediately after
sending the funding locked message. I think the code is cleaner having sendFundingLocked
, sendChannelAnnouncement
, & addToRouterGraph
as separate functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not suggesting you remove the sendFundingLocked
, sendChannelAnnouncement
, and addToRouterGraph
methods, I'm just suggesting you add another method sendFundingLockedAndAnnounceChannel
(or handleFundingConfirmation
), that calls those methods in the right order. I read over #332, and it appears the duplicated code exists there as well with no differences between the 4 occurrences.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah gotcha. #332 is still dependent on this, so it very well could change - it's more of a placeholder PR at this point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like handleFundingConfirmation
:)
fundingmanager.go
Outdated
@@ -1463,7 +1579,7 @@ func (f *fundingManager) sendChannelAnnouncement(completeChan *channeldb.OpenCha | |||
*shortChanID, chanID) | |||
if err != nil { | |||
fndgLog.Errorf("channel announcement failed: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error gets logged twice, both here and where the returned error value is handled. I'll let someone more familiar with this project's style weigh in, but if the error gets returned, I don't think it's appropriate to log here. There are more instances in this method and in sendFundingLocked
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the best way to handle this is to return a new error that combines the two:
return fmt.Errorf("channel announcement failed: %v", err)
aa9855b
to
adda49b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments on line length and returned errors, otherwise very good :)
fundingmanager.go
Outdated
// wait for funding transaction on startup. | ||
case shortChanID, ok := <-confChan: | ||
if !ok { | ||
fndgLog.Errorf("waiting for funding confirmation failed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line looks a bit long. We try to keep a 80 character line length width 8 width tabs.
fundingmanager.go
Outdated
|
||
// Call the function that handles funding | ||
// confirmation. | ||
err := f.handleFundingConfirmation(completeChan, shortChanID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably a bit long
fundingmanager.go
Outdated
case <-doneChan: | ||
case shortChanID, ok := <-confChan: | ||
if !ok { | ||
fndgLog.Errorf("waiting for funding confirmation failed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
long line
fundingmanager.go
Outdated
|
||
// Call the function that handles funding | ||
// confirmation. | ||
err := f.handleFundingConfirmation(completeChan, shortChanID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
long
@@ -455,11 +476,17 @@ func (f *fundingManager) Start() error { | |||
if err != nil { | |||
fndgLog.Errorf("error creating "+ | |||
"lightning channel: %v", err) | |||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
@@ -1188,8 +1228,10 @@ func (f *fundingManager) handleFundingSigned(fmsg *fundingSignedMsg) { | |||
}, | |||
} | |||
|
|||
f.wg.Add(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this had to be added to make sure the goroutine was properly shutdown between tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
fundingmanager.go
Outdated
func (f *fundingManager) sendFundingLockedAndAnnounceChannel( | ||
completeChan *channeldb.OpenChannel, shortChanID *lnwire.ShortChannelID) { | ||
// handleFundingConfirmation is a wrapper method for creating a new lightning | ||
// channel, calling sendFundingLocked, and for calling sendChannelAnnouncement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lightning channel ->LightningChannel
fundingmanager.go
Outdated
completeChan *channeldb.OpenChannel, shortChanID *lnwire.ShortChannelID) { | ||
// handleFundingConfirmation is a wrapper method for creating a new lightning | ||
// channel, calling sendFundingLocked, and for calling sendChannelAnnouncement. | ||
// This is called when the funding transaction is first confirmed and the channel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... called after the funding...
fundingmanager.go
Outdated
@@ -1416,14 +1493,14 @@ func (f *fundingManager) sendFundingLockedAndAnnounceChannel( | |||
nextRevocation, err := channel.NextRevocationKey() | |||
if err != nil { | |||
fndgLog.Errorf("unable to create next revocation: %v", err) | |||
return | |||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do return fmt.Errorf("unable to create next revocation: %v", err)
here and other places in this method
fundingmanager.go
Outdated
@@ -1474,7 +1550,7 @@ func (f *fundingManager) sendChannelAnnouncement(completeChan *channeldb.OpenCha | |||
err = f.deleteChannelOpeningState(&completeChan.FundingOutpoint) | |||
if err != nil { | |||
fndgLog.Errorf("error deleting channel state: %v", err) | |||
return | |||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same in this method
fundingmanager.go
Outdated
// Success, funding transaction was confirmed. | ||
|
||
// Call the function that handles funding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is not necessary IMO. The next line is pretty clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the last comments, rebase and squash and it LGTM! 🌔
fundingmanager.go
Outdated
f.deleteReservationCtx(peerKey, | ||
fmsg.msg.PendingChannelID) | ||
|
||
// Call the function that handles funding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment can also be removed, as discussed earlier.
fundingmanager.go
Outdated
} | ||
|
||
// Call the function that handles funding | ||
// confirmation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use
// Success, funding transaction was confirmed.
fundingmanager.go
Outdated
close(doneChan) | ||
case shortChanID, ok := <-waitingConfChan: | ||
if !ok { | ||
close(confChan) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comment
// Failed waiting for confirmation, close confChan to indicate failure.
fundingmanager.go
Outdated
if err != nil { | ||
fndgLog.Errorf("error creating new lightning channel: %v", err) | ||
return | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt.Errorf("failed sending fundingLocked: %v", err)
fundingmanager.go
Outdated
defer channel.Stop() | ||
err = f.sendChannelAnnouncement(completeChan, lnChannel, shortChanID) | ||
if err != nil { | ||
return err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt.Errorf("failed sending channel announcement: %v", err)
58d0532
to
9f5d54f
Compare
fundingmanager.go
Outdated
|
||
chanID := lnwire.NewChanIDFromOutPoint(&completeChan.FundingOutpoint) | ||
// We create the state-machine object which wraps the database state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: missing a period at the end of the sentence.
fundingmanager.go
Outdated
// Now that the funding transaction has the required number of | ||
// confirmations, we send the fundingLocked message to the peer. | ||
f.sendFundingLockedAndAnnounceChannel(completeChan, &shortChanID) | ||
confChan <- &shortChanID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to avoid possible future deadlocks on shutdown, this should be converted to instead be a conditional send:
select {
case confChan <- &shortChanID:
case <-f.quit:
return
}
fundingmanager.go
Outdated
close(confChan) | ||
return | ||
} | ||
confChan <- shortChanID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to avoid possible future deadlocks on shutdown, this should be converted to instead be a conditional send:
select {
case confChan <- shortChanID:
case <-f.quit:
return
}
fad92ce is a merge. I think it might be preferred to rebase onto master instead (https://github.com/lightningnetwork/lnd/blob/master/docs/code_contribution_guidelines.md#53-acceptance). |
6fb2446
to
bb2cbfe
Compare
bb2cbfe
to
9e5813a
Compare
This commit decouples the wait for funding transaction confirmations in the waitForFundingConfirmation function from the announcement of the channel in the sendFundingLockedAndAnnounceChannel function. Additionally, the sendFundingLockedAndAnnounceChannel function is now decoupled into the sendFundingLocked and sendChannelAnnouncement functions. There is also now a helper function that houses creation of a lnwire.LightningChannel object, calls to both sendFundingLocked and sendChannelAnnouncement.
9e5813a
to
426a803
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 💫
This PR tackles the first step of issue #305.
waitForFundingConfirmation
is decoupled from the channel announcements andsendFundingLockedAndAnnounceChannel
is now decoupled intosendFundingLocked
andsendChannelAnnouncement
.A future PR will handle:
sendChannelAnnouncement
.FundingLocked
message.