Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12fa1a4e97 | ||
|
|
1ec817b248 | ||
|
|
4a68da7bcd | ||
|
|
5f8a1ff51d | ||
|
|
7e4f9cd58f | ||
|
|
67f74ff9ef | ||
|
|
56cd8940b1 | ||
|
|
5e5d6b9b14 | ||
|
|
73385d3f79 | ||
|
|
0d1e796517 | ||
|
|
96e4fa20e4 | ||
|
|
dfe2da32b5 | ||
|
|
396f966d70 | ||
|
|
c8142e3297 | ||
|
|
909aec6cb6 | ||
|
|
12b6b696ef | ||
|
|
e8521991af | ||
|
|
bf3c4b84bc | ||
|
|
dfc3b800d1 | ||
|
|
bb78d0e128 | ||
|
|
9191786fe5 |
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -10,3 +10,6 @@
|
|||||||
[submodule "externals/quarkcoin-hash"]
|
[submodule "externals/quarkcoin-hash"]
|
||||||
path = externals/quarkcoin-hash
|
path = externals/quarkcoin-hash
|
||||||
url = https://github.com/Neisklar/quarkcoin-hash-python
|
url = https://github.com/Neisklar/quarkcoin-hash-python
|
||||||
|
[submodule "externals/vertcoin_scrypt"]
|
||||||
|
path = externals/vertcoin_scrypt
|
||||||
|
url = https://github.com/scr34m/vertcoin_scrypt.git
|
||||||
|
|||||||
@ -5,7 +5,8 @@ Please rename it to config.py and fill correct values.
|
|||||||
This is already setup with sane values for solomining.
|
This is already setup with sane values for solomining.
|
||||||
You NEED to set the parameters in BASIC SETTINGS
|
You NEED to set the parameters in BASIC SETTINGS
|
||||||
'''
|
'''
|
||||||
|
#********************* Config Version ***************
|
||||||
|
CONFIG_VERSION = 0.1
|
||||||
# ******************** BASIC SETTINGS ***************
|
# ******************** BASIC SETTINGS ***************
|
||||||
# These are the MUST BE SET parameters!
|
# These are the MUST BE SET parameters!
|
||||||
|
|
||||||
@ -16,14 +17,10 @@ COINDAEMON_TRUSTED_PORT = 8332
|
|||||||
COINDAEMON_TRUSTED_USER = 'user'
|
COINDAEMON_TRUSTED_USER = 'user'
|
||||||
COINDAEMON_TRUSTED_PASSWORD = 'somepassword'
|
COINDAEMON_TRUSTED_PASSWORD = 'somepassword'
|
||||||
|
|
||||||
# Coin Algorithm is the option used to determine the algortithm used by stratum
|
COINDAEMON_ALGO = 'scrypt' # The available options are: scrypt, sha256d, scrypt-jane, skeinhash, and quark
|
||||||
# This currently works with POW and POS coins
|
SCRYPTJANE_NAME = 'vtc_scrypt'# Set this to the Scrypt jane module name e.g. yac_scrypt or vtc_scrypt
|
||||||
# The available options are:
|
COINDAEMON_TX = False # For Coins which support TX Messages please enter yes in the TX selection
|
||||||
# scrypt, sha256d, scrypt-jane, skeinhash, and quark
|
|
||||||
# If the option does not meet either of these criteria stratum defaults to scrypt
|
|
||||||
# For Coins which support TX Messages please enter yes in the TX selection
|
|
||||||
COINDAEMON_ALGO = 'scrypt'
|
|
||||||
COINDAEMON_TX = 'no'
|
|
||||||
# ******************** BASIC SETTINGS ***************
|
# ******************** BASIC SETTINGS ***************
|
||||||
# Backup Coin Daemon address's (consider having at least 1 backup)
|
# Backup Coin Daemon address's (consider having at least 1 backup)
|
||||||
# You can have up to 99
|
# You can have up to 99
|
||||||
@ -139,7 +136,7 @@ MERKLE_REFRESH_INTERVAL = 60 # How often check memorypool
|
|||||||
INSTANCE_ID = 31 # Used for extranonce and needs to be 0-31
|
INSTANCE_ID = 31 # Used for extranonce and needs to be 0-31
|
||||||
|
|
||||||
# ******************** Pool Difficulty Settings *********************
|
# ******************** Pool Difficulty Settings *********************
|
||||||
VDIFF_X2_TYPE = True # powers of 2 e.g. 2,4,8,16,32,64,128,256,512,1024
|
VDIFF_X2_TYPE = False # powers of 2 e.g. 2,4,8,16,32,64,128,256,512,1024
|
||||||
VDIFF_FLOAT = False # Use float difficulty
|
VDIFF_FLOAT = False # Use float difficulty
|
||||||
|
|
||||||
# Pool Target (Base Difficulty)
|
# Pool Target (Base Difficulty)
|
||||||
|
|||||||
1
externals/vertcoin_scrypt
vendored
Submodule
1
externals/vertcoin_scrypt
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 4a3d789cf4fd713308f26610e39e81cb7d86423f
|
||||||
@ -39,7 +39,7 @@ class CoinbaseTransactionPOW(halfnode.CTransaction):
|
|||||||
tx_out.nValue = value
|
tx_out.nValue = value
|
||||||
tx_out.scriptPubKey = coinbaser.get_script_pubkey()
|
tx_out.scriptPubKey = coinbaser.get_script_pubkey()
|
||||||
|
|
||||||
if settings.COINDAEMON_TX == 'yes':
|
if settings.COINDAEMON_TX != False:
|
||||||
self.strTxComment = "http://github.com/ahmedbodi/stratum-mining"
|
self.strTxComment = "http://github.com/ahmedbodi/stratum-mining"
|
||||||
self.vin.append(tx_in)
|
self.vin.append(tx_in)
|
||||||
self.vout.append(tx_out)
|
self.vout.append(tx_out)
|
||||||
@ -87,7 +87,7 @@ class CoinbaseTransactionPOS(halfnode.CTransaction):
|
|||||||
tx_out.scriptPubKey = coinbaser.get_script_pubkey()
|
tx_out.scriptPubKey = coinbaser.get_script_pubkey()
|
||||||
|
|
||||||
self.nTime = ntime
|
self.nTime = ntime
|
||||||
if settings.COINDAEMON_SHA256_TX == 'yes':
|
if settings.COINDAEMON_SHA256_TX != False:
|
||||||
self.strTxComment = "http://github.com/ahmedbodi/stratum-mining"
|
self.strTxComment = "http://github.com/ahmedbodi/stratum-mining"
|
||||||
self.vin.append(tx_in)
|
self.vin.append(tx_in)
|
||||||
self.vout.append(tx_out)
|
self.vout.append(tx_out)
|
||||||
|
|||||||
@ -23,20 +23,18 @@ log.debug("Got to Halfnode")
|
|||||||
if settings.COINDAEMON_ALGO == 'scrypt':
|
if settings.COINDAEMON_ALGO == 'scrypt':
|
||||||
log.debug("########################################### Loading LTC Scrypt #########################################################")
|
log.debug("########################################### Loading LTC Scrypt #########################################################")
|
||||||
import ltc_scrypt
|
import ltc_scrypt
|
||||||
|
elif settings.COINDAEMON_ALGO == 'scrypt-jane':
|
||||||
|
__import__(settings.SCRYPTJANE_NAME)
|
||||||
|
log.debug("########################################### LoadingScrypt 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':
|
||||||
|
import skeinhash
|
||||||
|
|
||||||
else:
|
else:
|
||||||
log.debug("########################################### Loading SHA256 Support ######################################################")
|
log.debug("########################################### Loading SHA256 Support ######################################################")
|
||||||
|
if settings.COINDAEMON_TX != False:
|
||||||
#if settings.COINDAEMON_Reward == 'POS':
|
|
||||||
# log.debug("########################################### Loading POS Support #########################################################")
|
|
||||||
# pass
|
|
||||||
#else:
|
|
||||||
# log.debug("########################################### Loading POW Support ######################################################")
|
|
||||||
# pass
|
|
||||||
|
|
||||||
if settings.COINDAEMON_TX == 'yes':
|
|
||||||
log.debug("########################################### Loading SHA256 Transaction Message Support #########################################################")
|
log.debug("########################################### Loading SHA256 Transaction Message Support #########################################################")
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
@ -158,7 +156,7 @@ class CTransaction(object):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
if settings.COINDAEMON_Reward == 'POW':
|
if settings.COINDAEMON_Reward == 'POW':
|
||||||
self.nVersion = 1
|
self.nVersion = 1
|
||||||
if settings.COINDAEMON_TX == 'yes':
|
if settings.COINDAEMON_TX != False:
|
||||||
self.nVersion = 2
|
self.nVersion = 2
|
||||||
self.vin = []
|
self.vin = []
|
||||||
self.vout = []
|
self.vout = []
|
||||||
@ -166,14 +164,14 @@ class CTransaction(object):
|
|||||||
self.sha256 = None
|
self.sha256 = None
|
||||||
elif settings.COINDAEMON_Reward == 'POS':
|
elif settings.COINDAEMON_Reward == 'POS':
|
||||||
self.nVersion = 1
|
self.nVersion = 1
|
||||||
if settings.COINDAEMON_TX == 'yes':
|
if settings.COINDAEMON_TX != False:
|
||||||
self.nVersion = 2
|
self.nVersion = 2
|
||||||
self.nTime = 0
|
self.nTime = 0
|
||||||
self.vin = []
|
self.vin = []
|
||||||
self.vout = []
|
self.vout = []
|
||||||
self.nLockTime = 0
|
self.nLockTime = 0
|
||||||
self.sha256 = None
|
self.sha256 = None
|
||||||
if settings.COINDAEMON_TX == 'yes':
|
if settings.COINDAEMON_TX != False:
|
||||||
self.strTxComment = ""
|
self.strTxComment = ""
|
||||||
|
|
||||||
def deserialize(self, f):
|
def deserialize(self, f):
|
||||||
@ -190,7 +188,7 @@ class CTransaction(object):
|
|||||||
self.vout = deser_vector(f, CTxOut)
|
self.vout = deser_vector(f, CTxOut)
|
||||||
self.nLockTime = struct.unpack("<I", f.read(4))[0]
|
self.nLockTime = struct.unpack("<I", f.read(4))[0]
|
||||||
self.sha256 = None
|
self.sha256 = None
|
||||||
if settings.COINDAEMON_TX == 'yes':
|
if settings.COINDAEMON_TX != False:
|
||||||
self.strTxComment = deser_string(f)
|
self.strTxComment = deser_string(f)
|
||||||
|
|
||||||
def serialize(self):
|
def serialize(self):
|
||||||
@ -207,7 +205,7 @@ class CTransaction(object):
|
|||||||
r += ser_vector(self.vin)
|
r += ser_vector(self.vin)
|
||||||
r += ser_vector(self.vout)
|
r += ser_vector(self.vout)
|
||||||
r += struct.pack("<I", self.nLockTime)
|
r += struct.pack("<I", self.nLockTime)
|
||||||
if settings.COINDAEMON_TX == 'yes':
|
if settings.COINDAEMON_TX != False:
|
||||||
r += ser_string(self.strTxComment)
|
r += ser_string(self.strTxComment)
|
||||||
return r
|
return r
|
||||||
|
|
||||||
@ -236,10 +234,13 @@ class CBlock(object):
|
|||||||
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':
|
||||||
|
self.scryptjane = None
|
||||||
elif settings.COINDAEMON_ALGO == 'quark':
|
elif settings.COINDAEMON_ALGO == 'quark':
|
||||||
self.quark = None
|
self.quark = None
|
||||||
else: pass
|
elif settings.COINDAEMON_ALGO == 'skein':
|
||||||
|
self.skein = None
|
||||||
if settings.COINDAEMON_Reward == 'POS':
|
if settings.COINDAEMON_Reward == 'POS':
|
||||||
self.signature = b""
|
self.signature = b""
|
||||||
else: pass
|
else: pass
|
||||||
@ -294,6 +295,30 @@ class CBlock(object):
|
|||||||
r.append(struct.pack("<I", self.nNonce))
|
r.append(struct.pack("<I", self.nNonce))
|
||||||
self.quark = uint256_from_str(quark_hash.getPoWHash(''.join(r)))
|
self.quark = uint256_from_str(quark_hash.getPoWHash(''.join(r)))
|
||||||
return self.quark
|
return self.quark
|
||||||
|
elif settings.COINDAEMON_ALGO == 'scrypt-jane':
|
||||||
|
def calc_scryptjane(self):
|
||||||
|
if self.scryptjane is None:
|
||||||
|
r = []
|
||||||
|
r.append(struct.pack("<i", self.nVersion))
|
||||||
|
r.append(ser_uint256(self.hashPrevBlock))
|
||||||
|
r.append(ser_uint256(self.hashMerkleRoot))
|
||||||
|
r.append(struct.pack("<I", self.nTime))
|
||||||
|
r.append(struct.pack("<I", self.nBits))
|
||||||
|
r.append(struct.pack("<I", self.nNonce))
|
||||||
|
self.scryptjane = uint256_from_str(settings.SCRYPTJANE_NAME.getPoWHash(''.join(r)))
|
||||||
|
return self.scryptjane
|
||||||
|
elif settings.COINDAEMON_ALGO == 'skein':
|
||||||
|
def calc_skein(self):
|
||||||
|
if self.skein is None:
|
||||||
|
r = []
|
||||||
|
r.append(struct.pack("<i", self.nVersion))
|
||||||
|
r.append(ser_uint256(self.hashPrevBlock))
|
||||||
|
r.append(ser_uint256(self.hashMerkleRoot))
|
||||||
|
r.append(struct.pack("<I", self.nTime))
|
||||||
|
r.append(struct.pack("<I", self.nBits))
|
||||||
|
r.append(struct.pack("<I", self.nNonce))
|
||||||
|
self.skein = uint256_from_str(skeinhash.skeinhash(''.join(r)))
|
||||||
|
return self.skein
|
||||||
else:
|
else:
|
||||||
def calc_sha256(self):
|
def calc_sha256(self):
|
||||||
if self.sha256 is None:
|
if self.sha256 is None:
|
||||||
@ -313,6 +338,10 @@ class CBlock(object):
|
|||||||
self.calc_scrypt()
|
self.calc_scrypt()
|
||||||
elif settings.COINDAEMON_ALGO == 'quark':
|
elif settings.COINDAEMON_ALGO == 'quark':
|
||||||
self.calc_quark()
|
self.calc_quark()
|
||||||
|
elif settings.COINDAEMON_ALGO == 'scrypt-jane':
|
||||||
|
self.calc_scryptjane
|
||||||
|
elif settings.COINDAEMON_ALGO == 'skein':
|
||||||
|
self.calc_skein
|
||||||
else:
|
else:
|
||||||
self.calc_sha256()
|
self.calc_sha256()
|
||||||
|
|
||||||
@ -324,6 +353,12 @@ class CBlock(object):
|
|||||||
elif settings.COINDAEMON_ALGO == 'quark':
|
elif settings.COINDAEMON_ALGO == 'quark':
|
||||||
if self.quark > target:
|
if self.quark > target:
|
||||||
return False
|
return False
|
||||||
|
elif settings.COINDAEMON_ALGO == 'scrypt-jane':
|
||||||
|
if self.scryptjane > target:
|
||||||
|
return False
|
||||||
|
elif settings.COINDAEMON_ALGO == 'skein':
|
||||||
|
if self.skein > target:
|
||||||
|
return False
|
||||||
else:
|
else:
|
||||||
if self.sha256 > target:
|
if self.sha256 > target:
|
||||||
return False
|
return False
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import settings
|
|||||||
if settings.COINDAEMON_ALGO == 'scrypt':
|
if settings.COINDAEMON_ALGO == 'scrypt':
|
||||||
import ltc_scrypt
|
import ltc_scrypt
|
||||||
elif settings.COINDAEMON_ALGO == 'scrypt-jane':
|
elif settings.COINDAEMON_ALGO == 'scrypt-jane':
|
||||||
import yac_scrypt
|
scryptjane = __import__(settings.SCRYPTJANE_NAME)
|
||||||
elif settings.COINDAEMON_ALGO == 'quark':
|
elif settings.COINDAEMON_ALGO == 'quark':
|
||||||
import quark_hash
|
import quark_hash
|
||||||
elif settings.COINDAEMON_ALGO == 'skeinhash':
|
elif settings.COINDAEMON_ALGO == 'skeinhash':
|
||||||
@ -159,12 +159,16 @@ class TemplateRegistry(object):
|
|||||||
|
|
||||||
return diff1 / difficulty
|
return diff1 / difficulty
|
||||||
|
|
||||||
def get_job(self, job_id):
|
def get_job(self, job_id, worker_name, ip=False):
|
||||||
'''For given job_id returns BlockTemplate instance or None'''
|
'''For given job_id returns BlockTemplate instance or None'''
|
||||||
try:
|
try:
|
||||||
j = self.jobs[job_id]
|
j = self.jobs[job_id]
|
||||||
except:
|
except:
|
||||||
log.info("Job id '%s' not found" % job_id)
|
log.info("Job id '%s' not found, worker_name: '%s'" % (job_id, worker_name))
|
||||||
|
|
||||||
|
if ip:
|
||||||
|
log.info("Worker submited invalid Job id: IP %s", str(ip))
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# Now we have to check if job is still valid.
|
# Now we have to check if job is still valid.
|
||||||
@ -181,7 +185,7 @@ class TemplateRegistry(object):
|
|||||||
return j
|
return j
|
||||||
|
|
||||||
def submit_share(self, job_id, worker_name, session, extranonce1_bin, extranonce2, ntime, nonce,
|
def submit_share(self, job_id, worker_name, session, extranonce1_bin, extranonce2, ntime, nonce,
|
||||||
difficulty):
|
difficulty, ip=False):
|
||||||
'''Check parameters and finalize block template. If it leads
|
'''Check parameters and finalize block template. If it leads
|
||||||
to valid block candidate, asynchronously submits the block
|
to valid block candidate, asynchronously submits the block
|
||||||
back to the bitcoin network.
|
back to the bitcoin network.
|
||||||
@ -197,7 +201,7 @@ class TemplateRegistry(object):
|
|||||||
raise SubmitException("Incorrect size of extranonce2. Expected %d chars" % (self.extranonce2_size*2))
|
raise SubmitException("Incorrect size of extranonce2. Expected %d chars" % (self.extranonce2_size*2))
|
||||||
|
|
||||||
# Check for job
|
# Check for job
|
||||||
job = self.get_job(job_id)
|
job = self.get_job(job_id, worker_name, ip)
|
||||||
if job == None:
|
if job == None:
|
||||||
raise SubmitException("Job '%s' not found" % job_id)
|
raise SubmitException("Job '%s' not found" % job_id)
|
||||||
|
|
||||||
@ -241,7 +245,10 @@ class TemplateRegistry(object):
|
|||||||
if settings.COINDAEMON_ALGO == 'scrypt':
|
if settings.COINDAEMON_ALGO == 'scrypt':
|
||||||
hash_bin = ltc_scrypt.getPoWHash(''.join([ header_bin[i*4:i*4+4][::-1] for i in range(0, 20) ]))
|
hash_bin = ltc_scrypt.getPoWHash(''.join([ header_bin[i*4:i*4+4][::-1] for i in range(0, 20) ]))
|
||||||
elif settings.COINDAEMON_ALGO == 'scrypt-jane':
|
elif settings.COINDAEMON_ALGO == 'scrypt-jane':
|
||||||
hash_bin = yac_scrypt.getPoWHash(''.join([ header_bin[i*4:i*4+4][::-1] for i in range(0, 20) ]), int(ntime, 16))
|
if settings.SCRYPTJANE_NAME == 'vtc_scrypt':
|
||||||
|
hash_bin = scryptjane.getPoWHash(''.join([ header_bin[i*4:i*4+4][::-1] for i in range(0, 20) ]))
|
||||||
|
else:
|
||||||
|
hash_bin = scryptjane.getPoWHash(''.join([ header_bin[i*4:i*4+4][::-1] for i in range(0, 20) ]), int(ntime, 16))
|
||||||
elif settings.COINDAEMON_ALGO == 'quark':
|
elif settings.COINDAEMON_ALGO == 'quark':
|
||||||
hash_bin = quark_hash.getPoWHash(''.join([ header_bin[i*4:i*4+4][::-1] for i in range(0, 20) ]))
|
hash_bin = quark_hash.getPoWHash(''.join([ header_bin[i*4:i*4+4][::-1] for i in range(0, 20) ]))
|
||||||
elif settings.COINDAEMON_ALGO == 'skeinhash':
|
elif settings.COINDAEMON_ALGO == 'skeinhash':
|
||||||
|
|||||||
@ -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,7 +32,6 @@ def setup(on_startup):
|
|||||||
from lib.coinbaser import SimpleCoinbaser
|
from lib.coinbaser import SimpleCoinbaser
|
||||||
|
|
||||||
bitcoin_rpc = BitcoinRPCManager()
|
bitcoin_rpc = BitcoinRPCManager()
|
||||||
|
|
||||||
# Check litecoind
|
# Check litecoind
|
||||||
# Check we can connect (sleep)
|
# Check we can connect (sleep)
|
||||||
# Check the results:
|
# Check the results:
|
||||||
@ -41,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")
|
||||||
@ -98,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)
|
||||||
|
|||||||
@ -169,7 +169,7 @@ class MiningService(GenericService):
|
|||||||
# and it is valid proof of work.
|
# and it is valid proof of work.
|
||||||
try:
|
try:
|
||||||
(block_header, block_hash, share_diff, on_submit) = Interfaces.template_registry.submit_share(job_id,
|
(block_header, block_hash, share_diff, on_submit) = Interfaces.template_registry.submit_share(job_id,
|
||||||
worker_name, session, extranonce1_bin, extranonce2, ntime, nonce, difficulty)
|
worker_name, session, extranonce1_bin, extranonce2, ntime, nonce, difficulty, ip)
|
||||||
except SubmitException as e:
|
except SubmitException as e:
|
||||||
# block_header and block_hash are None when submitted data are corrupted
|
# block_header and block_hash are None when submitted data are corrupted
|
||||||
invalid += 1
|
invalid += 1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user