NScrypt and Version System fixes

This commit is contained in:
Ahmed Bodiwala 2014-02-02 18:36:38 +00:00
parent 396f966d70
commit dfe2da32b5
2 changed files with 13 additions and 11 deletions

View File

@ -232,7 +232,7 @@ class CBlock(object):
self.nNonce = 0 self.nNonce = 0
self.vtx = [] self.vtx = []
self.sha256 = None self.sha256 = None
if settings.COINDAEMON_ALGO == 'scrypt' if settings.COINDAEMON_ALGO == 'scrypt':
self.scrypt= None self.scrypt= None
elif settings.COINDAEMON_ALGO == 'scrypt-jane': elif settings.COINDAEMON_ALGO == 'scrypt-jane':
self.scryptjane = None self.scryptjane = None

View File

@ -7,7 +7,6 @@ import simplejson as json
from twisted.internet import reactor from twisted.internet import reactor
import threading import threading
from mining.work_log_pruner import WorkLogPruner from mining.work_log_pruner import WorkLogPruner
@defer.inlineCallbacks @defer.inlineCallbacks
def setup(on_startup): def setup(on_startup):
'''Setup mining service internal environment. '''Setup mining service internal environment.
@ -21,7 +20,9 @@ def setup(on_startup):
# Get logging online as soon as possible # Get logging online as soon as possible
import lib.logger import lib.logger
log = lib.logger.get_logger('mining') log = lib.logger.get_logger('mining')
if settings.CONFIG_VERSION == None:
settings.CONFIG_VERSION = 0
else: pass
from interfaces import Interfaces from interfaces import Interfaces
from lib.block_updater import BlockUpdater from lib.block_updater import BlockUpdater
@ -31,10 +32,6 @@ def setup(on_startup):
from lib.coinbaser import SimpleCoinbaser from lib.coinbaser import SimpleCoinbaser
bitcoin_rpc = BitcoinRPCManager() bitcoin_rpc = BitcoinRPCManager()
if settings.CONFIG_VERSION != 0.1:
log.exception("Config File is out of date. Stratum will now shut down")
reactor.stop()
else: continue
# Check litecoind # Check litecoind
# Check we can connect (sleep) # Check we can connect (sleep)
# Check the results: # Check the results:
@ -101,7 +98,12 @@ def setup(on_startup):
time.sleep(1) # If we didn't get a result or the connect failed time.sleep(1) # If we didn't get a result or the connect failed
log.info('Connected to the coind - Begining to load Address and Module Checks!') log.info('Connected to the coind - Begining to load Address and Module Checks!')
try:
if settings.CONFIG_VERSION != 0.1:
log.exception("Config File Out OF Date")
reactor.stop()
except:
pass
# Start the coinbaser # Start the coinbaser
coinbaser = SimpleCoinbaser(bitcoin_rpc, getattr(settings, 'CENTRAL_WALLET')) coinbaser = SimpleCoinbaser(bitcoin_rpc, getattr(settings, 'CENTRAL_WALLET'))
(yield coinbaser.on_load) (yield coinbaser.on_load)