changed from bsddb3 to pysqlite
[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
11 ### SEARCHING/STORING
12 # concurrent xmlrpc calls per find node/value request!
13 CONCURRENT_REQS = 4
14
15 # how many hosts to post to
16 STORE_REDUNDANCY = 3
17
18
19 ###  ROUTING TABLE STUFF
20 # how many times in a row a node can fail to respond before it's booted from the routing table
21 MAX_FAILURES = 3
22
23 # never ping a node more often than this
24 MIN_PING_INTERVAL = 60 * 15 # fifteen minutes
25
26 # refresh buckets that haven't been touched in this long
27 BUCKET_STALENESS = 60 # one hour
28
29
30 ###  KEY EXPIRER
31 # time before expirer starts running
32 KEINITIAL_DELAY = 15 # 15 seconds - to clean out old stuff in persistent db
33
34 # time between expirer runs
35 KE_DELAY = 60 * 60 # 1 hour
36
37 # expire entries older than this
38 KE_AGE = 60 * 60 * 24 # 24 hours