From f5ebf8e231bdf0890c123cac69ec9bd37cae6850 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 15 Jun 2018 16:07:35 +0930 Subject: [PATCH] gossipd: send correct channel_update in response to query_short_channel_ids Cut & paste means we sometimes sent NULL: ``` 2018-06-15T00:13:51.908Z lightningd(23653): lightning_closingd-03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f chan #436: Gossipd gave us bad send_gossip message 0bc80000 ``` Fixes: #1581 Reported-by: @Xian001 Signed-off-by: Rusty Russell --- gossipd/gossip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gossipd/gossip.c b/gossipd/gossip.c index 37686b002..0d2e71fb0 100644 --- a/gossipd/gossip.c +++ b/gossipd/gossip.c @@ -1470,7 +1470,7 @@ static bool create_next_scid_reply(struct peer *peer) if (chan->half[0].channel_update) queue_peer_msg(peer, chan->half[0].channel_update); if (chan->half[1].channel_update) - queue_peer_msg(peer, chan->half[0].channel_update); + queue_peer_msg(peer, chan->half[1].channel_update); /* Record node ids for later transmission of node_announcement */ append_query_node(peer, &chan->nodes[0]->id);