changed new share to delay payouts 1 share
authorForrest Voight <forrest@forre.st>
Wed, 26 Jun 2013 20:01:24 +0000 (16:01 -0400)
committerForrest Voight <forrest@forre.st>
Wed, 3 Jul 2013 18:31:03 +0000 (14:31 -0400)
p2pool/data.py

index 27c72e3..83c1cdc 100644 (file)
@@ -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)