mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
lightningd: fix crash on listpeers.
Fixes: #1680 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
f850849486
commit
d84d358562
@ -781,7 +781,7 @@ static void gossipd_getpeers_complete(struct subd *gossip, const u8 *msg,
|
||||
}
|
||||
|
||||
/* Search gossip reply for this ID, to add extra info. */
|
||||
for (size_t i = 0; i < tal_len(nodes); i++) {
|
||||
for (size_t i = 0; i < tal_count(nodes); i++) {
|
||||
if (pubkey_eq(&nodes[i]->nodeid, &p->id)) {
|
||||
json_add_node_decoration(response, nodes[i]);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user