return ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(N))
from processor import Processor
-
+from version import VERSION
class IrcThread(threading.Thread):
def getname(self):
- s = ''
+ s = 'v' + VERSION + ' '
if self.stratum_tcp_port:
s += 't' + self.stratum_tcp_port + ' '
if self.stratum_http_port:
line = sf.readline()
line = line.rstrip('\r\n')
line = line.split()
+ if not line: continue
if line[0]=='PING':
s.send('PONG '+line[1]+'\n')
elif '353' in line: # answer to /names
"subscriptions":len(s.subscriptions)},
self.dispatcher.request_dispatcher.get_sessions())
+ elif method == 'server.cache':
+ p = self.dispatcher.request_dispatcher.processors['blockchain']
+ result = len(repr(p.store.tx_cache))
+
+ elif method == 'server.load':
+ p = self.dispatcher.request_dispatcher.processors['blockchain']
+ result = p.queue.qsize()
+
else:
print "unknown method", request