NScrypt and Version System fixes
This commit is contained in:
parent
396f966d70
commit
dfe2da32b5
@ -28,7 +28,7 @@ elif settings.COINDAEMON_ALGO == 'scrypt-jane':
|
|||||||
elif settings.COINDAEMON_ALGO == 'quark':
|
elif settings.COINDAEMON_ALGO == 'quark':
|
||||||
log.debug("########################################### Loading Quark Support #########################################################")
|
log.debug("########################################### Loading Quark Support #########################################################")
|
||||||
import quark_hash
|
import quark_hash
|
||||||
elif settings.COINDAEMON_ALGO == 'skeinhash':
|
elif settings.COINDAEMON_ALGO == 'skeinhash':
|
||||||
import skeinhash
|
import skeinhash
|
||||||
|
|
||||||
else:
|
else:
|
||||||
@ -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
|
||||||
|
|||||||
@ -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.
|
||||||
@ -17,11 +16,13 @@ def setup(on_startup):
|
|||||||
*before* you call setup() in the launcher script.'''
|
*before* you call setup() in the launcher script.'''
|
||||||
|
|
||||||
import lib.settings as settings
|
import lib.settings as settings
|
||||||
|
|
||||||
# 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:
|
||||||
@ -44,7 +41,7 @@ def setup(on_startup):
|
|||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
result = (yield bitcoin_rpc.check_submitblock())
|
result = (yield bitcoin_rpc.check_submitblock())
|
||||||
if result == True:
|
if result == True:
|
||||||
log.info("Found submitblock")
|
log.info("Found submitblock")
|
||||||
elif result == False:
|
elif result == False:
|
||||||
log.info("Did not find submitblock")
|
log.info("Did not find submitblock")
|
||||||
@ -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)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user