Browse Source
json_listpeers returns an array of peers, and an array of nodes: the latter is a subset of the former, and is used for printing alias/color information. This changes it so there is a 1:1 correspondance between the peer information and nodes, meaning no more O(n^2) search. If there is no node_announce for a peer, we use a negative timestamp (already used to indicate that the rest of the gossip_getnodes_entry is not valid). Other fixes: 1. Use get_node instead of iterating through the node map. 2. A node without addresses is perfectly valid: we have to use the timestamp to see if the alias/color are set. Previously we wouldn't print that if it didn't also advertize an address. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>ppa-0.6.1
Rusty Russell
7 years ago
committed by
Christian Decker
3 changed files with 30 additions and 38 deletions
Can't render this file because it has a wrong number of fields in line 6.
|
Loading…
Reference in new issue