1 ## Copyright 2002-2003 Andrew Loewenstern, All Rights Reserved
2 # see LICENSE.txt for license information
5 from twisted.internet.default import SelectReactor ## twistedmatrix.com
7 reactor = SelectReactor()
9 from twisted.internet import main
10 main.installReactor(reactor)
14 import twisted.names.client
15 reactor.installResolver(twisted.names.client.theResolver)
17 print "no resolv.conf!"
20 # magic id to use before we know a peer's id
23 # Kademlia "K" constant, this should be an even number
26 # SHA1 is 160 bits long
29 # checkpoint every this many seconds
30 CHECKPOINT_INTERVAL = 60 * 15 # fifteen minutes
34 # concurrent xmlrpc calls per find node/value request!
37 # how many hosts to post to
41 ### ROUTING TABLE STUFF
42 # how many times in a row a node can fail to respond before it's booted from the routing table
45 # never ping a node more often than this
46 MIN_PING_INTERVAL = 60 * 15 # fifteen minutes
48 # refresh buckets that haven't been touched in this long
49 BUCKET_STALENESS = 60 * 60 # one hour
53 # time before expirer starts running
54 KEINITIAL_DELAY = 15 # 15 seconds - to clean out old stuff in persistent db
56 # time between expirer runs
57 KE_DELAY = 60 * 20 # 20 minutes
59 # expire entries older than this
60 KE_AGE = 60 * 60 # 60 minutes