mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
channeld: allow gossipd to fwd messages through us without updating gossip_index.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
c8294c4091
commit
61e3c0c23e
1 changed files with 6 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue