|
@ -708,14 +708,14 @@ static struct io_plan *peer_pkt_out(struct io_conn *conn, struct peer *peer) |
|
|
return ready_for_master(conn, peer); |
|
|
return ready_for_master(conn, peer); |
|
|
} else if (peer->gossip_sync) { |
|
|
} else if (peer->gossip_sync) { |
|
|
/* If we're supposed to be sending gossip, do so now. */ |
|
|
/* If we're supposed to be sending gossip, do so now. */ |
|
|
struct queued_message *next; |
|
|
const u8 *next; |
|
|
|
|
|
|
|
|
next = next_broadcast_message(peer->daemon->rstate->broadcasts, |
|
|
next = next_broadcast(peer->daemon->rstate->broadcasts, |
|
|
&peer->broadcast_index); |
|
|
&peer->broadcast_index); |
|
|
|
|
|
|
|
|
if (next) |
|
|
if (next) |
|
|
return peer_write_message(conn, &peer->local->pcs, |
|
|
return peer_write_message(conn, &peer->local->pcs, |
|
|
next->payload, |
|
|
next, |
|
|
peer_pkt_out); |
|
|
peer_pkt_out); |
|
|
|
|
|
|
|
|
/* Gossip is drained. Wait for next timer. */ |
|
|
/* Gossip is drained. Wait for next timer. */ |
|
@ -915,7 +915,7 @@ static bool send_peer_with_fds(struct peer *peer, const u8 *msg) |
|
|
*/ |
|
|
*/ |
|
|
static bool nonlocal_dump_gossip(struct io_conn *conn, struct daemon_conn *dc) |
|
|
static bool nonlocal_dump_gossip(struct io_conn *conn, struct daemon_conn *dc) |
|
|
{ |
|
|
{ |
|
|
struct queued_message *next; |
|
|
const u8 *next; |
|
|
struct peer *peer = dc->ctx; |
|
|
struct peer *peer = dc->ctx; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -926,7 +926,7 @@ static bool nonlocal_dump_gossip(struct io_conn *conn, struct daemon_conn *dc) |
|
|
if (!peer->gossip_sync) |
|
|
if (!peer->gossip_sync) |
|
|
return false; |
|
|
return false; |
|
|
|
|
|
|
|
|
next = next_broadcast_message(peer->daemon->rstate->broadcasts, |
|
|
next = next_broadcast(peer->daemon->rstate->broadcasts, |
|
|
&peer->broadcast_index); |
|
|
&peer->broadcast_index); |
|
|
|
|
|
|
|
|
if (!next) { |
|
|
if (!next) { |
|
@ -935,7 +935,7 @@ static bool nonlocal_dump_gossip(struct io_conn *conn, struct daemon_conn *dc) |
|
|
} else { |
|
|
} else { |
|
|
u8 *msg = towire_gossip_send_gossip(conn, |
|
|
u8 *msg = towire_gossip_send_gossip(conn, |
|
|
peer->broadcast_index, |
|
|
peer->broadcast_index, |
|
|
next->payload); |
|
|
next); |
|
|
daemon_conn_send(peer->remote, take(msg)); |
|
|
daemon_conn_send(peer->remote, take(msg)); |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|