Commit Graph

14 Commits

Author SHA1 Message Date
358e621710
Round peer rating to 2 decimal places before saving knownnodes 2018-08-02 12:26:41 +03:00
659d45bb15
Create default knownnodes if cannot read from file 2018-05-21 18:49:39 +03:00
b499e1bd22
Start without knownnodes if JSON got corrupted 2018-05-21 18:49:39 +03:00
5e72fdba17
Simplified addKnownNode() and added docstrings 2018-05-21 18:49:38 +03:00
67feb8fee9
Serialize knownnodes to json by default
Fixes #1232
2018-05-21 18:49:38 +03:00
f87ce4ad50
Moved reading knownnodes.dat into knownnodes module 2018-05-21 18:49:38 +03:00
ca42b4be63
flake8 for knownnodes 2018-05-21 18:49:38 +03:00
d44c6c6464
Forget known nodes with bad rating 2017-10-19 08:52:44 +02:00
a0bbd21efc
Add ratings to peers
- outbound peers now have a rating
- it's also shown in the network status tab
- currently it's between -1 to +1, changes by 0.1 steps and uses a
hyperbolic function 0.05/(1.0 - rating) to convert rating to
probability with which we should connect to that node when randomly
chosen
- it increases when we successfully establish a full outbound connection
to a node, and decreases when we fail to do that
- onion nodes have priority when using SOCKS
2017-07-05 09:17:01 +02:00
b9d60f8b41
Max known nodes configurable 2017-06-24 12:17:01 +02:00
af8957ed72
Typo in the second most recent commit 2017-02-27 23:37:15 +01:00
339e375958
Bootstrap provider mode and minor knownNodes changes
- if knownNodes grows to 20000, instead of ignoring new nodes, forget
  the 1000 oldest ones
- drop connection after sendaddr if too many connections, even if it's
  an outbound one
- if maximum total connections are lower than maximum outbound
  connections, active bootstrap provider mode
- in this mode, check all addresses received before announcing them
- so basically it only annouces those addresses it successfully
  connected to
2017-02-27 23:31:12 +01:00
c778b81427
knownNodes refactoring and shutdown fixes
- saveKnownNodes replaced the repeated pickle.dump
- with knownNodesLock instead of acquire/release
- outgoingSynSender had an unnecessary loop during shutdown causing
  excessive CPU usage / GUI freezing
2017-02-09 11:53:33 +01:00
59f3a2fbe7
Reduce cyclic dependencies
- rearranged code to reduce cyclic dependencies
- doCleanShutdown is separated in shutdown.py
- shared queues are separated in queues.py
- some default values were moved to defaults.py
- knownnodes partially moved to knownnodes.py
2017-02-08 13:41:56 +01:00