X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=p2pool%2Fbitcoin%2Fworker_interface.py;h=98daf21db775afd00420624c172c5ea5c3c1f572;hb=f1969c773280c63adb3e0e5077b2de506fe0385d;hp=ca025fd84c510af2ba1124c7ba4ae8b0c8172415;hpb=87eb683780525a22550711de03797df4aac5f167;p=p2pool.git diff --git a/p2pool/bitcoin/worker_interface.py b/p2pool/bitcoin/worker_interface.py index ca025fd..98daf21 100644 --- a/p2pool/bitcoin/worker_interface.py +++ b/p2pool/bitcoin/worker_interface.py @@ -64,7 +64,7 @@ class WorkerInterface(object): if header['merkle_root'] not in self.merkle_root_to_handler: print >>sys.stderr, '''Couldn't link returned work's merkle root with its handler. This should only happen if this process was recently restarted!''' defer.returnValue(False) - defer.returnValue(self.merkle_root_to_handler[header['merkle_root']](header, request.getUser() if request.getUser() is not None else '', 0)) + defer.returnValue(self.merkle_root_to_handler[header['merkle_root']](header, request.getUser() if request.getUser() is not None else '', '\0'*self.worker_bridge.COINBASE_NONCE_LENGTH)) if p2pool.DEBUG: id = random.randrange(1000, 10000) @@ -85,7 +85,7 @@ class WorkerInterface(object): res = getwork.BlockAttempt( version=x['version'], previous_block=x['previous_block'], - merkle_root=bitcoin_data.check_merkle_link(bitcoin_data.hash256(x['coinb1'] + pack.IntType(32).pack(0) + x['coinb2']), x['merkle_link']), + merkle_root=bitcoin_data.check_merkle_link(bitcoin_data.hash256(x['coinb1'] + '\0'*self.worker_bridge.COINBASE_NONCE_LENGTH + x['coinb2']), x['merkle_link']), timestamp=x['timestamp'], bits=x['bits'], share_target=x['share_target'],