Skip to content

Commit

Permalink
fixes for share explorer
Browse files Browse the repository at this point in the history
  • Loading branch information
forrestv committed Mar 20, 2012
1 parent d38ea1a commit 10b8395
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions p2pool/web.py
Expand Up @@ -267,7 +267,7 @@ def render_GET(self, request):

format_bits = lambda bits: '%f (bits=%#8x) Work required: %sH</p>' % (bitcoin_data.target_to_difficulty(bits.target), bits.bits, math.format(bitcoin_data.target_to_average_attempts(bits.target)))

request.write('<h1>%s <a href="%x">%s</a></h1>' % (share.__class__, share.hash, p2pool_data.format_hash(share.hash)))
request.write('<h1>%s <a href="%x">%s</a></h1>' % (share.__class__.__name__, share.hash, p2pool_data.format_hash(share.hash)))
if share.previous_hash is not None:
request.write('<p>Previous: <a href="%x">%s</a>' % (share.previous_hash, p2pool_data.format_hash(share.previous_hash)))
if tracker.get_height(share.hash) >= 100:
Expand Down Expand Up @@ -298,10 +298,10 @@ def render_GET(self, request):
request.write('<p>Nonce: %i</p>' % (share.header['nonce'],))
if share.other_txs is not None:
tx_count = len(share.other_txs)
elif len(share.merkle_branch) == 0:
elif len(share.merkle_link['branch']) == 0:
tx_count = 1
else:
tx_count = 'between %i and %i' % (2**len(share.merkle_branch)//2+1, 2**len(share.merkle_branch))
tx_count = 'between %i and %i' % (2**len(share.merkle_link['branch'])//2+1, 2**len(share.merkle_link['branch']))
request.write('<p>Transactions: %s</p>' % (tx_count,))
coinbase = share.share_data['coinbase'].ljust(2, '\x00')
request.write('<p>Coinbase: %s %s</p>' % (cgi.escape(repr(coinbase)), coinbase.encode('hex')))
Expand Down

0 comments on commit 10b8395

Please sign in to comment.