Browse Source

connectd: remove gossip-related fields.

This almost completes the removal of the last vestages of gossipd.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
parent
commit
c9435787cb
  1. 18
      connectd/connect.c
  2. 5
      connectd/connect_wire.csv
  3. 6
      lightningd/connect_control.c

18
connectd/connect.c

@ -124,18 +124,12 @@ struct daemon {
struct timers timers;
u32 broadcast_interval;
/* Important peers */
struct important_peerid_map important_peerids;
/* Local and global features to offer to peers. */
u8 *localfeatures, *globalfeatures;
/* FIXME: Do not want. */
u8 alias[33];
u8 rgb[3];
/* Addresses master told us to use */
struct wireaddr_internal *proposed_wireaddr;
enum addr_listen_announce *proposed_listen_announce;
@ -153,9 +147,6 @@ struct daemon {
bool use_proxy_always;
char *tor_password;
/* Unapplied local updates waiting for their timers. */
struct list_head local_updates;
/* @see lightningd.config.use_dns */
bool use_dns;
@ -1278,17 +1269,14 @@ static struct io_plan *connect_init(struct daemon_conn *master,
struct daemon *daemon,
const u8 *msg)
{
struct bitcoin_blkid chain_hash;
u32 update_channel_interval;
struct wireaddr *proxyaddr;
struct wireaddr_internal *binding;
if (!fromwire_connectctl_init(
daemon, msg, &daemon->broadcast_interval, &chain_hash,
daemon, msg,
&daemon->id, &daemon->globalfeatures,
&daemon->localfeatures, &daemon->proposed_wireaddr,
&daemon->proposed_listen_announce, daemon->rgb,
daemon->alias, &update_channel_interval, &daemon->reconnect,
&daemon->proposed_listen_announce, &daemon->reconnect,
&proxyaddr, &daemon->use_proxy_always,
&daemon->dev_allow_localhost, &daemon->use_dns,
&daemon->tor_password)) {
@ -1923,10 +1911,8 @@ int main(int argc, char *argv[])
list_head_init(&daemon->reconnecting);
list_head_init(&daemon->reaching);
list_head_init(&daemon->addrhints);
list_head_init(&daemon->local_updates);
important_peerid_map_init(&daemon->important_peerids);
timers_init(&daemon->timers, time_mono());
daemon->broadcast_interval = 30000;
daemon->broken_resolver_response = NULL;
daemon->listen_fds = tal_arr(daemon, int, 0);
/* stdin == control */

5
connectd/connect_wire.csv

@ -3,8 +3,6 @@
#include <lightningd/gossip_msg.h>
connectctl_init,2000
connectctl_init,,broadcast_interval,u32
connectctl_init,,chain_hash,struct bitcoin_blkid
connectctl_init,,id,struct pubkey
connectctl_init,,gflen,u16
connectctl_init,,gfeatures,gflen*u8
@ -13,9 +11,6 @@ connectctl_init,,lfeatures,lflen*u8
connectctl_init,,num_wireaddrs,u16
connectctl_init,,wireaddrs,num_wireaddrs*struct wireaddr_internal
connectctl_init,,listen_announce,num_wireaddrs*enum addr_listen_announce
connectctl_init,,rgb,3*u8
connectctl_init,,alias,32*u8
connectctl_init,,update_channel_interval,u32
connectctl_init,,reconnect,bool
connectctl_init,,tor_proxyaddr,?struct wireaddr
connectctl_init,,use_tor_proxy_always,bool

Can't render this file because it has a wrong number of fields in line 5.

6
lightningd/connect_control.c

@ -357,12 +357,10 @@ int connectd_init(struct lightningd *ld)
}
msg = towire_connectctl_init(
tmpctx, ld->config.broadcast_interval,
&get_chainparams(ld)->genesis_blockhash, &ld->id,
tmpctx, &ld->id,
get_offered_global_features(tmpctx),
get_offered_local_features(tmpctx), wireaddrs,
listen_announce, ld->rgb,
ld->alias, ld->config.channel_update_interval, ld->reconnect,
listen_announce, ld->reconnect,
ld->proxyaddr, ld->use_proxy_always || ld->pure_tor_setup,
allow_localhost, ld->config.use_dns,
ld->tor_service_password ? ld->tor_service_password : "");

Loading…
Cancel
Save