web_root.putChild('recent_blocks', WebInterface(lambda: recent_blocks))
web_root.putChild('uptime', WebInterface(lambda: time.time() - start_time))
- try:
- from . import draw
- web_root.putChild('chain_img', WebInterface(lambda: draw.get(tracker, current_work.value['best_share_hash']), 'image/png'))
- except ImportError:
- print "Install Pygame and PIL to enable visualizations! Visualizations disabled."
-
new_root = resource.Resource()
web_root.putChild('web', new_root)
class Explorer(resource.Resource):
def render_GET(self, request):
- return 'moved to /static/explorer.html'
+ return 'moved to /static/'
def getChild(self, child, request):
return self
new_root.putChild('explorer', Explorer())
}, hd_obj)
task.LoopingCall(lambda: _atomic_write(hd_path, json.dumps(hd.to_obj()))).start(100)
@pseudoshare_received.watch
- def _(work, dead, user, had_vip_pass):
+ def _(work, dead, user):
t = time.time()
hd.datastreams['local_hash_rate'].add_datum(t, work)
if dead: