Skip to content

Commit

Permalink
removed now-useless other_txs Share attribute, updated web to use now…
Browse files Browse the repository at this point in the history
…-available exact transaction count
  • Loading branch information
forrestv committed Jun 28, 2013
1 parent 20af2df commit fb3ff94
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions p2pool/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))),
Expand Down
2 changes: 1 addition & 1 deletion p2pool/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def get_share(share_hash_str):
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)))
Expand Down
2 changes: 1 addition & 1 deletion web-static/share.html
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit fb3ff94

Please sign in to comment.