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 <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-06-15 16:07:35 +09:30 committed by Christian Decker
parent 60b3f0e376
commit f5ebf8e231

View File

@ -1470,7 +1470,7 @@ static bool create_next_scid_reply(struct peer *peer)
if (chan->half[0].channel_update) if (chan->half[0].channel_update)
queue_peer_msg(peer, chan->half[0].channel_update); queue_peer_msg(peer, chan->half[0].channel_update);
if (chan->half[1].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 */ /* Record node ids for later transmission of node_announcement */
append_query_node(peer, &chan->nodes[0]->id); append_query_node(peer, &chan->nodes[0]->id);