connectd: Pass the init_featurebits down to connectd and use in init

The `init_featurebits` are computed at startup, and then cached
indefinitely. They are then used whenever a new `init` handshake is performed.

We could add a new message to push updates to `connectd` whenever a plugin is
added or removed, but that's up for discussion.
This commit is contained in:
Christian Decker
2020-01-30 22:26:57 +01:00
committed by Rusty Russell
parent 58c9a6a004
commit 8d6c8c3cd1
5 changed files with 24 additions and 8 deletions

View File

@@ -15,6 +15,8 @@ msgdata,connectctl_init,dev_allow_localhost,bool,
msgdata,connectctl_init,use_dns,bool,
msgdata,connectctl_init,tor_password,wirestring,
msgdata,connectctl_init,use_v3_autotor,bool,
msgdata,connectctl_init,init_featurebits_len,u16,
msgdata,connectctl_init,init_featurebits,u8,init_featurebits_len
# Connectd->master, here are the addresses I bound, can announce.
msgtype,connectctl_init_reply,2100
1 #include <common/cryptomsg.h>
15 msgdata,connectctl_init,tor_password,wirestring,
16 msgdata,connectctl_init,use_v3_autotor,bool,
17 # Connectd->master, here are the addresses I bound, can announce. msgdata,connectctl_init,init_featurebits_len,u16,
18 msgdata,connectctl_init,init_featurebits,u8,init_featurebits_len
19 # Connectd->master, here are the addresses I bound, can announce.
20 msgtype,connectctl_init_reply,2100
21 msgdata,connectctl_init_reply,num_bindings,u16,
22 msgdata,connectctl_init_reply,bindings,wireaddr_internal,num_bindings