mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 23:54:22 +01:00
connectd: hold peer until we're interested.
Either because lightningd tells us it wants to talk, or because the peer says something about a channel. We also introduce a behavior change: we disconnect after a failed open. We might want to modify this later, but we it's a side-effect of openingd not holding onto idle connections. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -3932,9 +3932,6 @@ int main(int argc, char *argv[])
|
||||
* N'th per-commitment point. But since N=0, it won't give us one. */
|
||||
assert(none == NULL);
|
||||
|
||||
/*~ Turns out this is useful for testing, to make sure we're ready. */
|
||||
status_debug("Handed peer, entering loop");
|
||||
|
||||
/*~ We manually run a little poll() loop here. With only two fds */
|
||||
pollfd[0].fd = REQ_FD;
|
||||
pollfd[0].events = POLLIN;
|
||||
|
||||
@@ -313,6 +313,7 @@ static u8 *funder_channel_start(struct state *state, u8 channel_flags)
|
||||
struct tlv_accept_channel_tlvs *accept_tlvs;
|
||||
char *err_reason;
|
||||
|
||||
status_debug("funder_channel_start");
|
||||
if (!setup_channel_funder(state))
|
||||
return NULL;
|
||||
|
||||
@@ -1428,9 +1429,6 @@ int main(int argc, char *argv[])
|
||||
* N'th per-commitment point. But since N=0, it won't give us one. */
|
||||
assert(none == NULL);
|
||||
|
||||
/*~ Turns out this is useful for testing, to make sure we're ready. */
|
||||
status_debug("Handed peer, entering loop");
|
||||
|
||||
/*~ We manually run a little poll() loop here. With only three fds */
|
||||
pollfd[0].fd = REQ_FD;
|
||||
pollfd[0].events = POLLIN;
|
||||
|
||||
Reference in New Issue
Block a user