Commit Graph

12 Commits

Author SHA1 Message Date
Milos Gajdos
b91c3147e7
Node API allows us to drop all network locks
Network locks are now needed only when accessing client map. node map
access is serialied with the node mutex.
2019-09-13 03:03:56 +01:00
Milos Gajdos
77c6c9781b
getProtoTopology has been replaced by PeersToProto
This helps us remove redundant code across node and handler
2019-09-13 03:03:56 +01:00
Milos Gajdos
d6be91e8af
Changed RPC methods. Changed Network interface.
* Nodes/Topology removed from public methods from Network interface
* Peers() returns max depth 3 topology
* handler.Topology rpc endpoint removed
* handler.Peers rpc endpoint accept "depth" param to return max depth peers
2019-09-13 03:03:56 +01:00
Milos Gajdos
2dfbe93d65
Added more node tests. Small refactoring of Netowkr and handler. 2019-09-13 03:03:55 +01:00
Milos Gajdos
16fcf1fbda
Nodes, Peers and Topology methods for node
Topology accepts an argument to define the depth of the topology
requested from the network. proto definitions have been modified
accordingly, too.
2019-09-13 03:03:55 +01:00
Milos Gajdos
195c6a8c90
Neighbour is now peer. Neighbourhood is Peers. Small refactor. 2019-09-13 03:03:54 +01:00
Milos Gajdos
f0a1031e97
Adding new peers up to given depth. Outline of node gaph Update 2019-09-13 03:03:54 +01:00
Milos Gajdos
4b1a7abb42
Freeze network graph when building full network topology
Also added some comments and debug logs
2019-09-05 00:16:22 +01:00
Milos Gajdos
6eb6d050ed
Major bug overhaul in how we handle network.Nodes and related handler 2019-09-03 16:39:27 +01:00
Milos Gajdos
a8d4299df9
Sort the returned slice of nodes before searching
See docs:
https://golang.org/pkg/sort/#Search
2019-09-02 20:00:52 +01:00
Milos Gajdos
86665454e7
Implementation of Nodes method. First take on full handler 2019-09-02 17:06:21 +01:00
Milos Gajdos
bf53c16e4b
Rough outline of Network introspection interface 2019-09-02 12:40:05 +01:00