Added more node tests. Small refactoring of Netowkr and handler.

This commit is contained in:
Milos Gajdos
2019-09-11 00:23:37 +01:00
parent 16fcf1fbda
commit 2dfbe93d65
7 changed files with 145 additions and 159 deletions

View File

@@ -36,13 +36,11 @@ message PeerResponse {
message TopologyRequest {
// node id
string id = 1;
// topology depth
uint64 depth = 2;
}
// TopologyResponse is returned by Topology
message TopologyResponse {
Topology topology = 1;
Peer topology = 1;
}
// Node is network node
@@ -53,14 +51,6 @@ message Node {
string address = 2;
}
// Topology is used to nnounce node neighbourhood
message Topology {
// network node
Node node = 1;
// neighbours
repeated Node nodes = 2;
}
// Connect is sent when the node connects to the network
message Connect {
// network mode