mirror of https://github.com/BTCPrivate/z-nomp.git
modified to use new share data. enabled debug loggin for now
This commit is contained in:
parent
3e82e2849a
commit
d67b5c8bf7
|
@ -3,7 +3,7 @@
|
|||
"symbol": "doge",
|
||||
"algorithm": "scrypt",
|
||||
"reward": "POW",
|
||||
"address": "n3s8iDk1onxyY2nuC1k4HoRQFGJ7BhjFcq",
|
||||
"address": "nhfNedMmQ1Rjb62znwaiJgFhL3f4NQztSp",
|
||||
"stratumPort": 3334,
|
||||
"difficulty": 8,
|
||||
"blockRefreshInterval": 1,
|
||||
|
@ -11,6 +11,6 @@
|
|||
"host": "localhost",
|
||||
"port": 19334,
|
||||
"user": "testnet",
|
||||
"password": "testnet1"
|
||||
"password": "testnet"
|
||||
}
|
||||
}
|
||||
|
|
21
init.js
21
init.js
|
@ -6,9 +6,9 @@ var PoolLogger = require('./libs/logutils.js');
|
|||
var loggerInstance = new PoolLogger({
|
||||
'default': true,
|
||||
'keys': {
|
||||
'client' : 'warning',
|
||||
//'client' : 'warning',
|
||||
'system' : true,
|
||||
'submitblock' : true,
|
||||
'submitblock' : true
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -41,11 +41,20 @@ fs.readdirSync('coins').forEach(function(file){
|
|||
|
||||
|
||||
var pool = stratum.createPool(coinOptions, authorizeFN);
|
||||
pool.on('share', function(isValid, data){
|
||||
if (isValid)
|
||||
logDebug(coinOptions.name, 'client', "A new Valid share from " + data.client.workerName + " has arrived! - " + data.blockHeaderHex);
|
||||
pool.on('share', function(isValidShare, isValidBlock, data){
|
||||
|
||||
var shareData = JSON.stringify(data);
|
||||
|
||||
if (isValidBlock)
|
||||
logDebug(coinOptions.name, 'client', 'Block found, share data: ' + shareData);
|
||||
else if (isValidShare)
|
||||
logDebug(coinOptions.name, 'client', 'Valid share submitted, share data: ' + shareData);
|
||||
else if (data.solution)
|
||||
logDebug(coinOptions.name, 'client', 'We thought a block solution was found but it was rejected by the daemon, share data: ' + shareData);
|
||||
else
|
||||
logDebug(coinOptions.name, 'client', "Invalid share form " + data.client.workerName + " ErrorCode: " + data.errorCode + " ErrorDescription: " + data.errorDescription);
|
||||
logDebug(coinOptions.name, 'client', 'Invalid share submitted, share data: ' + shareData)
|
||||
|
||||
|
||||
}).on('log', function(severity, logKey, logText) {
|
||||
if (severity == 'debug') {
|
||||
logDebug(coinOptions.name, logKey, logText);
|
||||
|
|
|
@ -56,7 +56,7 @@ var PoolLogger = function (configuration) {
|
|||
var log = function(severity, key, poolName, text) {
|
||||
if ( ! shouldLog(key, severity) ) {
|
||||
// if this tag is set to not be logged or the default value is false then drop it!
|
||||
//console.log(key+"DROPPED "+text);
|
||||
//console.log(key+"DROPPED "+text + 'SEV' + severity);
|
||||
return;
|
||||
|
||||
}
|
||||
|
|
|
@ -27,4 +27,4 @@
|
|||
"url": "https://github.com/zone117x/node-stratum-portal/issues"
|
||||
},
|
||||
"homepage": "https://github.com/zone117x/node-stratum-portal"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue