From 1c68675a84730f4bd9d526c4708eea904a6c364c Mon Sep 17 00:00:00 2001 From: Forrest Voight Date: Fri, 30 Mar 2012 12:55:36 -0400 Subject: [PATCH] added /difficulty to web interface --- p2pool/web.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/p2pool/web.py b/p2pool/web.py index b285e99..c82698d 100644 --- a/p2pool/web.py +++ b/p2pool/web.py @@ -188,6 +188,7 @@ def get_web_root(tracker, current_work, current_work2, get_current_txouts, datad return self.func(*self.args) web_root.putChild('rate', WebInterface(get_rate, 'application/json')) + web_root.putChild('difficulty', WebInterface(lambda: json.dumps(bitcoin_data.target_to_difficulty(tracker.shares[current_work.value['best_share_hash']].max_target)), 'application/json')) web_root.putChild('users', WebInterface(get_users, 'application/json')) web_root.putChild('fee', WebInterface(lambda: json.dumps(worker_fee), 'application/json')) web_root.putChild('current_payouts', WebInterface(get_current_payouts, 'application/json')) -- 1.7.1