diff --git a/conf/config_sample.py b/conf/config_sample.py index 5060b0b..50beefa 100644 --- a/conf/config_sample.py +++ b/conf/config_sample.py @@ -54,7 +54,7 @@ LOGDIR = 'log/' # Main application log file. LOGFILE = None # eg. 'stratum.log' - +LOGLEVEL = 'DEBUG' # Logging Rotation can be enabled with the following settings # It if not enabled here, you can set up logrotate to rotate the files. # For built in log rotation set LOG_ROTATION = True and configrue the variables @@ -172,6 +172,10 @@ ALLOW_EXTERNAL_DIFFICULTY = False # For People using the MPOS frontend enabling this is recommended. It allows the frontend to compare the block hash to the coin daemon reducing the liklihood of missing share error's for blocks SOLUTION_BLOCK_HASH = True # If enabled, enter the block hash. If false enter the scrypt/sha hash into the shares table +#Pass scrypt hash to submit block check. +#Use if submit block is returning errors and marking submitted blocks invaild upstream, but the submitted blocks are being a accepted by the coin daemon into the block chain. +BLOCK_CHECK_SCRYPT_HASH = False + # ******************** Worker Ban Options ********************* ENABLE_WORKER_BANNING = True # enable/disable temporary worker banning WORKER_CACHE_TIME = 600 # How long the worker stats cache is good before we check and refresh diff --git a/lib/bitcoin_rpc.py b/lib/bitcoin_rpc.py index a7c8919..9af5eb3 100644 --- a/lib/bitcoin_rpc.py +++ b/lib/bitcoin_rpc.py @@ -93,7 +93,7 @@ class BitcoinRPC(object): defer.returnValue(json.loads(resp)['result']) @defer.inlineCallbacks - def blockexists(self,_hash_hex): + def blockexists(self, hash_hex): resp = (yield self._call('getblock', [hash_hex,])) if "hash" in json.loads(resp)['result'] and json.loads(resp)['result']['hash'] == hash_hex: log.debug("Block Confirmed: %s" % hash_hex) diff --git a/lib/template_registry.py b/lib/template_registry.py index e7a0233..7986604 100644 --- a/lib/template_registry.py +++ b/lib/template_registry.py @@ -280,7 +280,7 @@ class TemplateRegistry(object): # 7. Submit block to the network serialized = binascii.hexlify(job.serialize()) - if settings.BLOCK_CHECK_SCRYPT_HASH: + 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)