From: Forrest Voight Date: Wed, 11 Apr 2012 16:08:14 +0000 (-0400) Subject: added special "p2pool" MM target to match P2Pool share target X-Git-Tag: 3.2~4^2~4 X-Git-Url: https://git.novaco.in/?a=commitdiff_plain;h=473e85a6b7394fe9ce4c98215d10922ea65a2007;p=p2pool.git added special "p2pool" MM target to match P2Pool share target --- diff --git a/p2pool/main.py b/p2pool/main.py index 95b6d99..6cb1435 100644 --- a/p2pool/main.py +++ b/p2pool/main.py @@ -225,7 +225,7 @@ def main(args, net, datadir_path, merged_urls, worker_endpoint): auxblock = yield deferral.retry('Error while calling merged getauxblock:', 1)(merged_proxy.rpc_getauxblock)() pre_merged_work.set(dict(pre_merged_work.value, **{auxblock['chainid']: dict( hash=int(auxblock['hash'], 16), - target=pack.IntType(256).unpack(auxblock['target'].decode('hex')), + target='p2pool' if auxblock['target'] == 'p2pool' else pack.IntType(256).unpack(auxblock['target'].decode('hex')), merged_proxy=merged_proxy, )})) yield deferral.sleep(1) @@ -572,7 +572,7 @@ def main(args, net, datadir_path, merged_urls, worker_endpoint): for aux_work, index, hashes in mm_later: try: - if pow_hash <= aux_work['target'] or p2pool.DEBUG: + if pow_hash <= (aux_work['target'] if aux_work['target'] != 'p2pool' else share_info['bits'].target) or p2pool.DEBUG: df = deferral.retry('Error submitting merged block: (will retry)', 10, 10)(aux_work['merged_proxy'].rpc_getauxblock)( pack.IntType(256, 'big').pack(aux_work['hash']).encode('hex'), bitcoin_data.aux_pow_type.pack(dict(