connectd: setup chainparams

We are going to signal the genesis block hash in the init message.
This commit is contained in:
darosior 2019-11-28 12:17:57 +01:00 committed by Christian Decker
parent c84473f82c
commit e6b8a02446
2 changed files with 2 additions and 0 deletions

View File

@ -4,6 +4,7 @@
#include <lightningd/gossip_msg.h>
msgtype,connectctl_init,2000
msgdata,connectctl_init,chainparams,chainparams,
msgdata,connectctl_init,id,node_id,
msgdata,connectctl_init,num_wireaddrs,u16,
msgdata,connectctl_init,wireaddrs,wireaddr_internal,num_wireaddrs

1 #include <common/cryptomsg.h>
4 #include <lightningd/gossip_msg.h>
5 msgtype,connectctl_init,2000
6 msgdata,connectctl_init,id,node_id, msgdata,connectctl_init,chainparams,chainparams,
7 msgdata,connectctl_init,id,node_id,
8 msgdata,connectctl_init,num_wireaddrs,u16,
9 msgdata,connectctl_init,wireaddrs,wireaddr_internal,num_wireaddrs
10 msgdata,connectctl_init,listen_announce,enum addr_listen_announce,num_wireaddrs

View File

@ -1145,6 +1145,7 @@ static struct io_plan *connect_init(struct io_conn *conn,
/* Fields which require allocation are allocated off daemon */
if (!fromwire_connectctl_init(
daemon, msg,
&chainparams,
&daemon->id,
&proposed_wireaddr,
&proposed_listen_announce,