mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
gossipd: minor cleanups.
Suggested-by: @cdecker Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -904,7 +904,7 @@ static struct short_channel_id *decode_short_ids(const tal_t *ctx,
|
|||||||
|
|
||||||
static void handle_query_short_channel_ids(struct peer *peer, u8 *msg)
|
static void handle_query_short_channel_ids(struct peer *peer, u8 *msg)
|
||||||
{
|
{
|
||||||
struct routing_state *rstate =peer->daemon->rstate;
|
struct routing_state *rstate = peer->daemon->rstate;
|
||||||
struct bitcoin_blkid chain;
|
struct bitcoin_blkid chain;
|
||||||
u8 *encoded;
|
u8 *encoded;
|
||||||
struct short_channel_id *scids;
|
struct short_channel_id *scids;
|
||||||
@@ -930,7 +930,7 @@ static void handle_query_short_channel_ids(struct peer *peer, u8 *msg)
|
|||||||
* - MAY fail the connection.
|
* - MAY fail the connection.
|
||||||
*/
|
*/
|
||||||
if (peer->scid_queries || peer->scid_query_nodes) {
|
if (peer->scid_queries || peer->scid_query_nodes) {
|
||||||
peer_error(peer, "Bad second query_short_channel_ids");
|
peer_error(peer, "Bad concurrent query_short_channel_ids");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -706,6 +706,8 @@ static void json_channel_range_reply(struct subd *gossip UNUSED, const u8 *reply
|
|||||||
}
|
}
|
||||||
|
|
||||||
json_object_start(response, NULL);
|
json_object_start(response, NULL);
|
||||||
|
/* As this is a dev interface, we don't bother saving and
|
||||||
|
* returning all the replies, just the final one. */
|
||||||
json_add_num(response, "final_first_block", final_first_block);
|
json_add_num(response, "final_first_block", final_first_block);
|
||||||
json_add_num(response, "final_num_blocks", final_num_blocks);
|
json_add_num(response, "final_num_blocks", final_num_blocks);
|
||||||
json_add_bool(response, "final_complete", final_complete);
|
json_add_bool(response, "final_complete", final_complete);
|
||||||
|
|||||||
Reference in New Issue
Block a user