X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=p2pool%2Fwork.py;h=d61045f0961df2b09c98daef9609440bbf7032fb;hb=26e6e3712f2b58c509b095fd717cacef3bb7fbc9;hp=21268393f011290659815fbc07eae3b6bf066a80;hpb=ab9375a07f845b7ce233bb6ef4b3d6d9ff08f310;p=p2pool.git diff --git a/p2pool/work.py b/p2pool/work.py index 2126839..d61045f 100644 --- a/p2pool/work.py +++ b/p2pool/work.py @@ -86,7 +86,7 @@ class WorkerBridge(worker_interface.WorkerBridge): t = self.node.bitcoind_work.value bb = self.node.best_block_header.value - subsidy = self.node.net.PARENT.SUBSIDY_FUNC(bb['bits'].target) +# subsidy = self.node.net.PARENT.SUBSIDY_FUNC(self.node.pow_bits.target) if bb is not None and bb['previous_block'] == t['previous_block'] and self.node.net.PARENT.POW_FUNC(bitcoin_data.block_header_type.pack(bb)) <= t['bits'].target: print 'Skipping from block %x to block %x!' % (bb['previous_block'], @@ -94,14 +94,14 @@ class WorkerBridge(worker_interface.WorkerBridge): t = dict( version=bb['version'], previous_block=self.node.net.PARENT.BLOCKHASH_FUNC(bitcoin_data.block_header_type.pack(bb)), - bits=bb['bits'], # not always true + bits=self.node.pow_bits, # not always true coinbaseflags='', height=t['height'] + 1, time=bb['timestamp'] + 600, # better way? transactions=[], transaction_fees=[], merkle_link=bitcoin_data.calculate_merkle_link([None], 0), - subsidy=subsidy, + subsidy=self.node.pow_subsidy, last_update=self.node.bitcoind_work.value['last_update'], )