Browse Source

channeld: allow gossipd to fwd messages through us without updating gossip_index.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
61e3c0c23e
  1. 7
      channeld/channel.c

7
channeld/channel.c

@ -306,12 +306,17 @@ static void enqueue_peer_msg(struct peer *peer, const u8 *msg TAKES)
static void gossip_in(struct peer *peer, const u8 *msg)
{
u8 *gossip;
u64 gossip_index;
if (!fromwire_gossip_send_gossip(msg, msg, &peer->gossip_index, &gossip))
if (!fromwire_gossip_send_gossip(msg, msg, &gossip_index, &gossip))
status_failed(STATUS_FAIL_GOSSIP_IO,
"Got bad message from gossipd: %s",
tal_hex(msg, msg));
/* Zero is a special index meaning this is unindexed gossip. */
if (gossip_index != 0)
peer->gossip_index = gossip_index;
if (is_msg_for_gossipd(gossip))
enqueue_peer_msg(peer, gossip);
else if (fromwire_peektype(gossip) == WIRE_ERROR) {

Loading…
Cancel
Save