c1a736041e8450fa5f86a36e24d1e3ddedde831e
[quix0rs-apt-p2p.git] / const.py
1 from twisted.internet.default import SelectReactor ## twistedmatrix.com
2
3 reactor = SelectReactor(installSignalHandlers=0)
4 from twisted.internet import main
5 main.installReactor(reactor)
6
7 # magic id to use before we know a peer's id
8 NULL_ID =  20 * '\0'
9
10 ### SEARCHING/STORING
11 # concurrent xmlrpc calls per find node/value request!
12 CONCURRENT_REQS = 4
13
14 # how many hosts to post to
15 STORE_REDUNDANCY = 3
16
17 ###  ROUTING TABLE STUFF
18 # how many times in a row a node can fail to respond before it's booted from the routing table
19 MAX_FAILURES = 3
20
21 # never ping a node more often than this
22 MIN_PING_INTERVAL = 60 * 15 # fifteen minutes
23
24 # refresh buckets that haven't been touched in this long
25 BUCKET_STALENESS = 60 # one hour
26
27
28 ###  KEY EXPIRER
29 # time before expirer starts running
30 KEINITIAL_DELAY = 60 * 60 * 24 # 24 hours
31
32 # time between expirer runs
33 KE_DELAY = 60 * 60 # 1 hour
34
35 # expire entries older than this
36 KE_AGE = KEINITIAL_DELAY