From: burris Date: Tue, 1 Oct 2002 05:11:03 +0000 (+0000) Subject: mo' constants X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4ce86361073035f184d541b52f23a3bc07aae952;p=quix0rs-apt-p2p.git mo' constants --- diff --git a/const.py b/const.py index 1d904f6..c1a7360 100644 --- a/const.py +++ b/const.py @@ -4,13 +4,28 @@ reactor = SelectReactor(installSignalHandlers=0) from twisted.internet import main main.installReactor(reactor) +# magic id to use before we know a peer's id +NULL_ID = 20 * '\0' +### SEARCHING/STORING # concurrent xmlrpc calls per find node/value request! -CONCURRENT_REQS = 3 +CONCURRENT_REQS = 4 +# how many hosts to post to +STORE_REDUNDANCY = 3 + +### ROUTING TABLE STUFF # how many times in a row a node can fail to respond before it's booted from the routing table MAX_FAILURES = 3 +# never ping a node more often than this +MIN_PING_INTERVAL = 60 * 15 # fifteen minutes + +# refresh buckets that haven't been touched in this long +BUCKET_STALENESS = 60 # one hour + + +### KEY EXPIRER # time before expirer starts running KEINITIAL_DELAY = 60 * 60 * 24 # 24 hours @@ -19,9 +34,3 @@ 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 - -# refresh buckets that haven't been touched in this long -BUCKET_STALENESS = 60 # one hour