From fb3ff9423255ad8eb0bf4098e6a0724746cc4e5d Mon Sep 17 00:00:00 2001 From: Forrest Voight Date: Thu, 27 Jun 2013 19:05:52 -0400 Subject: [PATCH] removed now-useless other_txs Share attribute, updated web to use now-available exact transaction count --- p2pool/data.py | 2 -- p2pool/web.py | 2 +- web-static/share.html | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/p2pool/data.py b/p2pool/data.py index 8881623..d6386d0 100644 --- a/p2pool/data.py +++ b/p2pool/data.py @@ -56,8 +56,6 @@ class Share(object): VOTING_VERSION = 11 SUCCESSOR = None - other_txs = None - small_block_header_type = pack.ComposedType([ ('version', pack.VarIntType()), ('previous_block', pack.PossiblyNoneType(0, pack.IntType(256))), diff --git a/p2pool/web.py b/p2pool/web.py index c401e82..2cb7ee8 100644 --- a/p2pool/web.py +++ b/p2pool/web.py @@ -318,7 +318,7 @@ def get_web_root(wb, datadir_path, bitcoind_warning_var, stop_event=variable.Eve coinbase=share.share_data['coinbase'].ljust(2, '\x00').encode('hex'), value=share.share_data['subsidy']*1e-8, ), - txn_count_range=[len(share.other_txs), len(share.other_txs)] if share.other_txs is not None else 1 if len(share.merkle_link['branch']) == 0 else [2**len(share.merkle_link['branch'])//2+1, 2**len(share.merkle_link['branch'])], + txn_count=len(list(share.iter_transaction_hash_refs())), ), ) new_root.putChild('share', WebInterface(lambda share_hash_str: get_share(share_hash_str))) diff --git a/web-static/share.html b/web-static/share.html index 78e30df..4414ae7 100644 --- a/web-static/share.html +++ b/web-static/share.html @@ -60,7 +60,7 @@ var block = b.append('p') block.append('span').text('Hash: ') block.append('a').attr('href', currency_info.block_explorer_url_prefix + share.block.hash).text(share.block.hash); - b.append('p').text('Transaction count: ' + share.block.txn_count_range); + b.append('p').text('Transaction count: ' + share.block.txn_count); b.append('h2').text('Header'); b.append('p').text('Version: ' + share.block.header.version); var prevblock = b.append('p') -- 1.7.1