gossip: Moving to intmap-based broadcast for the legacy daemon

Moved the broadcast functionality to broadcast.[ch]. So far this
includes only the enqueuing side of broadcasts, the dequeuing and
actual push to the peer is daemon dependent. This also adds the
broadcast_state to the routing_state and the last broadcast index to
the peer for the legacy daemon.
This commit is contained in:
Christian Decker
2017-01-26 22:47:52 +01:00
committed by Rusty Russell
parent 3aa45a6d0b
commit 76e2c980e1
10 changed files with 121 additions and 70 deletions

View File

@@ -21,6 +21,7 @@ struct routing_state *new_routing_state(const tal_t *ctx, struct log *base_log)
struct routing_state *rstate = tal(ctx, struct routing_state);
rstate->base_log = base_log;
rstate->nodes = empty_node_map(rstate);
rstate->broadcasts = new_broadcast_state(rstate);
return rstate;
}