change submitblock to try both (correct) hashes on block creation

This commit is contained in:
Alan Penner 2014-01-22 14:02:32 -08:00 committed by Ahmed Bodiwala
parent 40a7e5dd92
commit 604e22749c

View File

@ -287,10 +287,7 @@ class TemplateRegistry(object):
# 7. Submit block to the network
serialized = binascii.hexlify(job.serialize())
if settings.BLOCK_CHECK_SCRYPT_HASH:
on_submit = self.bitcoin_rpc.submitblock(serialized, scrypt_hash_hex)
else:
on_submit = self.bitcoin_rpc.submitblock(serialized, block_hash_hex)
on_submit = self.bitcoin_rpc.submitblock(serialized, block_hash_hex, scrypt_hash_hex)
if on_submit:
self.update_block()