Was not logging invalid found blocks correctly

This commit is contained in:
Matt 2014-02-26 22:57:22 -07:00
parent 4b9154fd9f
commit 08fe9ab18d
2 changed files with 11 additions and 14 deletions

View File

@ -8,31 +8,28 @@
"stratumPort": 3334, "stratumPort": 3334,
"difficulty": 8, "difficulty": 8,
"blockRefreshInterval": 1000, "blockRefreshInterval": 1000,
"daemon": [ "daemon": [
{ //first daemon instance {
"host": "localhost", "host": "localhost",
"port": 19332, "port": 19332,
"user": "litecoinrpc", "user": "litecoinrpc",
"password": "testnet" "password": "testnet"
}, },
{ //backup daemon instance {
"host": "localhost", "host": "localhost",
"port": 19344, "port": 19344,
"user": "litecoinrpc", "user": "litecoinrpc",
"password": "testnet" "password": "testnet"
} }
], ],
"varDiff": { "varDiff": {
"enabled": true, //set to false to disable vardiff functionality "enabled": true,
"minDifficulty": 8, //minimum difficulty. below 16 will cause problems "minDifficulty": 16,
"maxDifficulty": 1000, //network difficulty will be used if it is lower than this "maxDifficulty": 1000,
"targetTime": 60, //target time per share (i.e. try to get 1 share per this many seconds) "targetTime": 30,
"retargetTime": 10, //check to see if we should retarget every this many seconds "retargetTime": 120,
"variancePercent": 10 //allow average time to very this % from target without retarget "variancePercent": 20
}, },
"p2p": { "p2p": {
"enabled": true, "enabled": true,
"host": "localhost", "host": "localhost",

View File

@ -55,12 +55,12 @@ fs.readdirSync('coins').forEach(function(file){
var shareData = JSON.stringify(data); var shareData = JSON.stringify(data);
if (isValidBlock) if (data.solution && !isValidBlock)
logDebug(coinOptions.name, 'client', 'We thought a block solution was found but it was rejected by the daemon, share data: ' + shareData);
else if (isValidBlock)
logDebug(coinOptions.name, 'client', 'Block found, share data: ' + shareData); logDebug(coinOptions.name, 'client', 'Block found, share data: ' + shareData);
else if (isValidShare) else if (isValidShare)
logDebug(coinOptions.name, 'client', 'Valid share submitted, share data: ' + shareData); 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 else
logDebug(coinOptions.name, 'client', 'Invalid share submitted, share data: ' + shareData) logDebug(coinOptions.name, 'client', 'Invalid share submitted, share data: ' + shareData)