-
Notifications
You must be signed in to change notification settings - Fork 941
Let channeld add the outgoing channel as soon as funding locked on both sides #450
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
Conversation
Rebased on top of master now that #413 is merged. |
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.
Minor weirdness needs deleting, otherwise great!
gossipd/gossip.c
Outdated
|
||
/* Sent from channeld through its gossip_fd */ | ||
case WIRE_GOSSIP_LOCAL_ADD_CHANNEL: | ||
break; | ||
} |
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 deeply confusing.
Just remove gossip_local_add_channel and the weird call to it: the "break;" here does exactly what we want if the master sends us that message for some reason.
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.
See also line 1601, and the weird function it calls, which AFAICT shouldn't exist?
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.
Oh wow, seems I botched up a rebase somewhere, sorry about that
Great, thanks for the review @rustyrussell, I added a fixup and I'll squash and merge if you're ok with it |
Removed the scaffolding I completely forgot about :-)
Couldn't find a good place to put these messages, we probably want to do the same capability based request routing that we did for the HSM, but for now this just defines the message in the master messages file. Signed-off-by: Christian Decker <[email protected]>
Signed-off-by: Christian Decker <[email protected]>
This adds the channel from us to the remote node and activates it with our local parameters. Signed-off-by: Christian Decker <[email protected]>
Relatively simple: until we reach funding-depth the channels should be known locally, so we can already route through them, but they should not be announced to peers to which the connection is non-local. Signed-off-by: Christian Decker <[email protected]>
094fc88
to
89e2b9b
Compare
This is an alternative to #414. The main difference is that instead of having unsigned
channel_announcement
andchannel_update
messages that are allowed through if they are local, we add a new message thatchanneld
can send togossipd
when both sides lock. This message now contains only the necessary information for the outgoing direction, and will immediately activate the channel so we can use it.Fixes #284
Depends on #413 (only the last 4 commits are for this PR, all others are from #413)