From 80753bfbd548de2a5d60ed59a3c329bbd85997c2 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 15 Jan 2019 14:40:27 +1030 Subject: [PATCH] Feedback from @niftynei. Signed-off-by: Rusty Russell --- contrib/pylightning/lightning/lightning.py | 2 +- gossipd/routing.c | 3 ++- lightningd/gossip_control.c | 2 +- tests/test_gossip.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/contrib/pylightning/lightning/lightning.py b/contrib/pylightning/lightning/lightning.py index a4392cb7f..9031e8db4 100644 --- a/contrib/pylightning/lightning/lightning.py +++ b/contrib/pylightning/lightning/lightning.py @@ -153,7 +153,7 @@ class LightningRpc(UnixDomainSocketRpc): {cltv} (default 9). If specified search from {fromid} otherwise use this node as source. Randomize the route with up to {fuzzpercent} (0.0 -> 100.0, default 5.0) using {seed} as an arbitrary-size string - seed. {exclude} is an optional array of scids[xDirection] to exclude. + seed. {exclude} is an optional array of scid/direction to exclude. """ payload = { "id": peer_id, diff --git a/gossipd/routing.c b/gossipd/routing.c index e8243dd0e..1c105217e 100644 --- a/gossipd/routing.c +++ b/gossipd/routing.c @@ -489,7 +489,8 @@ find_route(const tal_t *ctx, struct routing_state *rstate, } if (max_hops > ROUTING_MAX_HOPS) { - status_info("find_route: max_hops huge amount %zu", max_hops); + status_info("find_route: max_hops huge amount %zu > %u", + max_hops, ROUTING_MAX_HOPS); return NULL; } diff --git a/lightningd/gossip_control.c b/lightningd/gossip_control.c index 479251d82..e863d27ab 100644 --- a/lightningd/gossip_control.c +++ b/lightningd/gossip_control.c @@ -368,7 +368,7 @@ static struct command_result *json_getroute(struct command *cmd, &excluded_dir[i])) { return command_fail(cmd, JSONRPC2_INVALID_PARAMS, "%.*s is not a valid" - " id+direction", + " short_channel_id/direction", t->end - t->start, buffer + t->start); } diff --git a/tests/test_gossip.py b/tests/test_gossip.py index 5bbe74aa7..f812e99fd 100644 --- a/tests/test_gossip.py +++ b/tests/test_gossip.py @@ -284,7 +284,7 @@ def test_gossip_jsonrpc(node_factory): assert only_one(channels1)['destination'] == l2.info['id'] assert channels1 == channels2 - channels2 = l2.rpc.listchannels()['channels'] + l2.rpc.listchannels()['channels'] # Now proceed to funding-depth and do a full gossip round l1.bitcoin.generate_block(5)