From 795ebfa18d09a85e6dec6b4b93fe742f8ae4c688 Mon Sep 17 00:00:00 2001 From: Alan Penner Date: Sun, 19 Jan 2014 10:10:23 -0800 Subject: [PATCH] change to getdifficulty/proof-of-stake for POW/POS detection --- mining/__init__.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mining/__init__.py b/mining/__init__.py index 7a9da20..ae19935 100644 --- a/mining/__init__.py +++ b/mining/__init__.py @@ -44,17 +44,14 @@ def setup(on_startup): if isinstance(result, dict): # litecoind implements version 1 of getblocktemplate if result['version'] >= 1: - result = (yield bitcoin_rpc.getinfo()) + result = (yield bitcoin_rpc.getdifficulty()) if isinstance(result,dict): - if 'stake' in result: # and settings.COINDAEMON_Reward == 'POS': + if 'proof-of-stake' in result: # and settings.COINDAEMON_Reward == 'POS': settings.COINDAEMON_Reward = 'POS' break - elif 'stake' not in result: # and settings.COINDAEMON_Reward == 'POW': + elif 'proof-of-stake' not in result: # and settings.COINDAEMON_Reward == 'POW': 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'])