Browse Source

lightningd: initialize topology synclist earlier.

We were doing it in setup_topology, but that's too late if gossipd
wants to register earlier.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
travis-debug
Rusty Russell 5 years ago
parent
commit
6955bf6b86
  1. 4
      lightningd/chaintopology.c

4
lightningd/chaintopology.c

@ -944,6 +944,8 @@ struct chain_topology *new_topology(struct lightningd *ld, struct log *log)
topo->poll_seconds = 30;
topo->feerate_uninitialized = true;
topo->root = NULL;
topo->sync_waiters = tal(topo, struct list_head);
list_head_init(topo->sync_waiters);
return topo;
}
@ -953,8 +955,6 @@ void setup_topology(struct chain_topology *topo,
{
memset(&topo->feerate, 0, sizeof(topo->feerate));
topo->timers = timers;
topo->sync_waiters = tal(topo, struct list_head);
list_head_init(topo->sync_waiters);
topo->min_blockheight = min_blockheight;
topo->max_blockheight = max_blockheight;

Loading…
Cancel
Save