Commit Graph

42 Commits

Author SHA1 Message Date
Di Wu
f9bf562393
fix typo in comments (#1840)
* remove global error tracking

* rpc_server: fix invalid register err

* fix typo

Co-authored-by: Asim Aslam <asim@aslam.me>
2020-07-16 16:33:11 +01:00
f23638c036 fix import paths for v2 release
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-01-30 14:44:40 +03:00
Asim Aslam
6562154573 Fix the next panic 2020-01-15 21:38:37 +00:00
Milos Gajdos
36928b716c
Fixed bug:m network.proto backwards compatibility unmarshal 2020-01-15 19:45:43 +00:00
Milos Gajdos
dcd925f1e5
Code cleanup; Indentation. 2020-01-14 18:48:42 +00:00
Milos Gajdos
821fda41ae
Added Status method to network.Node fixed random segfaults. 2020-01-14 18:12:36 +00:00
Milos Gajdos
994d371ff1
Removed redundant comments. Add proper PruneStalePeers test. 2020-01-14 10:49:34 +00:00
Milos Gajdos
a91dad04ee
Increment node error count and prune when Max limit is hit 2020-01-13 22:22:12 +00:00
Milos Gajdos
770c7686ba
Fix nasty bug when graph action may not have been executed in some
branches
2020-01-13 20:14:30 +00:00
Milos Gajdos
0a4bd02503
Add RefreshSync method for Sync bookkeeping 2020-01-13 20:14:29 +00:00
Asim Aslam
b0b6b8fce2 final updates 2019-12-13 15:27:47 +00:00
Asim Aslam
d50f30d743 strip handlers 2019-12-10 11:46:13 +00:00
Asim Aslam
b29da80539 Move a few things around 2019-12-09 22:56:26 +00:00
Asim Aslam
c445aed6b1 Cleanup and speedup network convergence along with direct messaging for connect and solicit 2019-12-07 19:54:29 +00:00
Till Knuesting
5ae3e179b9 preallocated slices (#934) 2019-11-11 00:03:51 +00:00
Till Knuesting
f67c5e779f preallocated slices (#917) 2019-11-05 17:43:12 +00:00
Milos Gajdos
3d5d9be02a
Avoid recursive calls to RLock()
Topology calls itsel recursively invoking RLock. This, according to go
documentation is wrong. This commit moves the body of Topology function
to a non-thread safe unexported function to keep locsk at check!
2019-10-18 11:26:43 +01:00
Asim Aslam
5c38f38dd9
No need to lock here since Topology read locks and makes copies 2019-10-18 11:26:43 +01:00
Asim Aslam
b1fed01752 add network name to node 2019-10-14 22:26:23 +01:00
Milos Gajdos
a38482ffcb
Remove data race; Unlock once done pruning/deleting 2019-09-19 11:53:13 +01:00
Milos Gajdos
a72a2f717d
Prune stale nodes in the whole topology. 2019-09-16 19:22:55 +01:00
Milos Gajdos
2599ee8591
Prune routes routable via dead node. 2019-09-15 12:17:12 +01:00
Milos Gajdos
323a72be34
Small refactoring; Split horizon loop break. 2019-09-13 18:46:24 +01:00
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
fa4ff8921e
Removed redundant lock. Simplified proto topology 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
588484c3bf
Fixed some races. Added more tests. 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
cbce5490d7
Lock the Nodes method properly when collecting them. 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
f91d0408ab
Moved node implementation into dedicated source file 2019-09-13 03:03:54 +01:00
Asim Aslam
608a1f8add remove node code 2019-07-08 16:25:04 +01:00
Asim Aslam
e0bf1c2283 Remove Port from registry 2019-07-08 08:01:42 +01:00
Asim Aslam
777a203f96 gofmt 2019-07-07 12:33:54 +01:00
Asim Aslam
d2d6841f02 Move transport to network/transport 2019-07-07 10:37:34 +01:00
Asim Aslam
eafc930f84 Change network id to name 2019-07-07 10:10:38 +01:00
Asim Aslam
2644497ccb Fix some link connection logic 2019-07-03 19:51:40 +01:00
Asim Aslam
e54de56376 Functional loopback code 2019-07-03 19:26:24 +01:00
Asim Aslam
f619e46def Some functioning network code 2019-07-02 20:54:21 +01:00
Asim Aslam
543dc0166c Restructure network things before moving 2019-07-02 08:45:00 +01:00