Skip to content

Commit

Permalink
display links to found shares in share explorer
Browse files Browse the repository at this point in the history
  • Loading branch information
forrestv committed Sep 28, 2013
1 parent 740e306 commit 391787f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions p2pool/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ def get_share(share_hash_str):
new_root.putChild('tails', WebInterface(lambda: ['%064x' % x for t in node.tracker.tails for x in node.tracker.reverse.get(t, set())]))
new_root.putChild('verified_tails', WebInterface(lambda: ['%064x' % x for t in node.tracker.verified.tails for x in node.tracker.verified.reverse.get(t, set())]))
new_root.putChild('best_share_hash', WebInterface(lambda: '%064x' % node.best_share_var.value))
new_root.putChild('my_share_hashes', WebInterface(lambda: ['%064x' % my_share_hash for my_share_hash in wb.my_share_hashes]))
def get_share_data(share_hash_str):
if int(share_hash_str, 16) not in node.tracker.items:
return ''
Expand Down
2 changes: 2 additions & 0 deletions web-static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
fill('../web/heads', '#heads');
fill('../web/verified_tails', '#verified_tails');
fill('../web/tails', '#tails');
fill('../web/my_share_hashes', '#my_share_hashes');
</script>
</head>
<body>
Expand All @@ -114,6 +115,7 @@ <h2>Share explorer</h2>
<p>Heads: <span id="heads"></span></p>
<p>Verified tails: <span id="verified_tails"></span></p>
<p>Tails: <span id="tails"></span></p>
<p>My shares: <span id="my_share_hashes"></span></p>

<h2>Blocks found in last day:</h2>
<p>Note that blocks may have been orphaned from the P2Pool chain and so not be here.</p>
Expand Down

0 comments on commit 391787f

Please sign in to comment.