subd: record which ones connect to a peer.

This comes in useful for the next patch.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-04-26 14:21:01 +09:30
parent b68fb24758
commit 1e282ecb7a
6 changed files with 27 additions and 16 deletions

View File

@@ -698,7 +698,7 @@ u8 *peer_accept_channel(const tal_t *ctx,
"Multiple channels unsupported");
uc->openingd = new_channel_subd(ld, "lightning_openingd", uc, uc->log,
opening_wire_type_name, NULL,
true, opening_wire_type_name, NULL,
opening_channel_errmsg,
opening_channel_set_billboard,
take(&peer_fd), take(&gossip_fd),
@@ -786,12 +786,13 @@ static void peer_offer_channel(struct lightningd *ld,
tal_steal(fc->uc, fc);
fc->uc->openingd = new_channel_subd(ld,
"lightning_openingd", fc->uc, fc->uc->log,
opening_wire_type_name, NULL,
opening_channel_errmsg,
opening_channel_set_billboard,
take(&peer_fd), take(&gossip_fd),
NULL);
"lightning_openingd",
fc->uc, fc->uc->log,
true, opening_wire_type_name, NULL,
opening_channel_errmsg,
opening_channel_set_billboard,
take(&peer_fd), take(&gossip_fd),
NULL);
if (!fc->uc->openingd) {
/* We don't send them an error packet: for them, nothing
* happened! */