X-Git-Url: https://git.novaco.in/?p=p2pool.git;a=blobdiff_plain;f=p2pool%2Fdata.py;h=83c1cdc42f2a6fb8b280390f4a18563629330bc8;hp=27c72e342c28a7bcdba306d1066fa65938c67e72;hb=76b297b65cd33bf972b00820b635b993f28e8133;hpb=ddc6867abf56760fa85f0826aa36cb10ac7c8360 diff --git a/p2pool/data.py b/p2pool/data.py index 27c72e3..83c1cdc 100644 --- a/p2pool/data.py +++ b/p2pool/data.py @@ -157,8 +157,8 @@ class NewShare(object): assert base_subsidy is not None share_data = dict(share_data, subsidy=base_subsidy + definite_fees) - weights, total_weight, donation_weight = tracker.get_cumulative_weights(share_data['previous_share_hash'], - min(height, net.REAL_CHAIN_LENGTH), + weights, total_weight, donation_weight = tracker.get_cumulative_weights(previous_share.share_data['previous_share_hash'] if previous_share is not None else None, + min(height, net.REAL_CHAIN_LENGTH-1), 65535*net.SPREAD*bitcoin_data.target_to_average_attempts(block_target), ) assert total_weight == sum(weights.itervalues()) + donation_weight, (total_weight, sum(weights.itervalues()) + donation_weight)