diff --git a/mining/__init__.py b/mining/__init__.py index 59f78ba..d5f665c 100644 --- a/mining/__init__.py +++ b/mining/__init__.py @@ -44,19 +44,16 @@ def setup(on_startup): if isinstance(result, dict): # litecoind implements version 1 of getblocktemplate if result['version'] >= 1: - break - while True: - try: - result = (yield bitcoin_rpc.getinfo()) - if isinstance(result,dict): - if 'stake' in result and settings.COINDAEMON_Reward == 'POS': - break - #elif 'stake' is not in result and settings.COINDAEMON_Reward == 'POW': - elif result.has_key('stake') and settings.COINDAEMON_Reward == 'POW': - break - else: - log.error("Wrong Algo Selected, Switch to appropriate POS/POW in config.py!") - reactor.stop() + result = (yield bitcoin_rpc.getinfo()) + if isinstance(result,dict): + if 'stake' in result and settings.COINDAEMON_Reward == 'POS': + break + #elif 'stake' is not in result and settings.COINDAEMON_Reward == 'POW': + elif result.has_key('stake') and settings.COINDAEMON_Reward == 'POW': + break + else: + log.error("Wrong Algo Selected, Switch to appropriate POS/POW in config.py!") + reactor.stop() else: log.error("Block Version mismatch: %s" % result['version'])