Fix reward calculation
[p2pool.git] / p2pool / data.py
index 0bc04e3..e5a69ce 100644 (file)
@@ -49,7 +49,7 @@ def load_share(share, net, peer_addr):
     else:
         raise ValueError('unknown share type: %r' % (share['type'],))
 
-DONATION_SCRIPT  = '410418ca0d3ae9712c1640692030f4774d66428edce1d75790d470d2e460fd03327141279a73beb92cdcbd64204a90901d135b6e5e6f9d299517424c5ab08d4fac22ac'.decode('hex')
+DONATION_SCRIPT  = '41043b253cc0b5c8ce26f24b84bb955bec955cbb4643f19ab7ea073884f22874abdafc42040b97efec3c9eeb29ce69022a96cc1772f8bc805f78af0d3dc5c441db5fac'.decode('hex')
 
 class Share(object):
     VERSION = 13
@@ -152,10 +152,10 @@ class Share(object):
         removed_fees = [fee for tx_hash, fee in desired_other_transaction_hashes_and_fees if tx_hash not in included_transactions]
         definite_fees = sum(0 if fee is None else fee for tx_hash, fee in desired_other_transaction_hashes_and_fees if tx_hash in included_transactions)
         if None not in removed_fees:
-            share_data = dict(share_data, subsidy=share_data['subsidy'] - sum(removed_fees))
+            share_data = dict(share_data, subsidy=share_data['subsidy'])
         else:
             assert base_subsidy is not None
-            share_data = dict(share_data, subsidy=base_subsidy + definite_fees)
+            share_data = dict(share_data, subsidy=base_subsidy)
         
         weights, total_weight, donation_weight = tracker.get_cumulative_weights(previous_share.share_data['previous_share_hash'] if previous_share is not None else None,
             max(0, min(height, net.REAL_CHAIN_LENGTH) - 1),