]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - const.py
fix bug where less than K nodes were being utilized from the seed nodes of find nodes...
[quix0rs-apt-p2p.git] / const.py
index a36d34309000fe5c0c63c68d1e923f9446aec318..e6ef83200d9f7964ac6ff73d60ec65642d729d53 100644 (file)
--- a/const.py
+++ b/const.py
@@ -2,4 +2,23 @@ from twisted.internet.default import SelectReactor ## twistedmatrix.com
 
 reactor = SelectReactor(installSignalHandlers=0)
 from twisted.internet import main
-main.installReactor(reactor)
\ No newline at end of file
+main.installReactor(reactor)
+
+
+# concurrent xmlrpc calls per find node/value request!
+CONCURRENT_REQS = 3
+
+# how many times in a row a node can fail to respond before it's booted from the routing table
+MAX_FAILURES = 3
+
+# time before expirer starts running
+KEINITIAL_DELAY = 60 * 60 * 24 # 24 hours
+
+# time between expirer runs
+KE_DELAY = 60 * 60 # 1 hour
+
+# expire entries older than this
+KE_AGE = KEINITIAL_DELAY
+
+# never ping a node more often than this
+MIN_PING_INTERVAL = 60 * 15 # fifteen minutes