Update pool.js
This commit is contained in:
11
lib/pool.js
11
lib/pool.js
@@ -1208,8 +1208,7 @@ function processShare (miner, job, blockTemplate, params) {
|
|||||||
if (error) {
|
if (error) {
|
||||||
log('error', logSystem, 'Error submitting block at height %d from %s@%s, share type: "%s" - %j', [job.height, miner.login, miner.ip, shareType, error]);
|
log('error', logSystem, 'Error submitting block at height %d from %s@%s, share type: "%s" - %j', [job.height, miner.login, miner.ip, shareType, error]);
|
||||||
} else {
|
} else {
|
||||||
let blockFastHash = utils.cnUtil.get_block_id(shareBuffer, cnBlobType)
|
let blockFastHash = utils.cnUtil.get_block_id(shareBuffer, cnBlobType).toString('hex');
|
||||||
.toString('hex');
|
|
||||||
log('info', logSystem,
|
log('info', logSystem,
|
||||||
'Block %s found at height %d by miner %s@%s - submit result: %j',
|
'Block %s found at height %d by miner %s@%s - submit result: %j',
|
||||||
[blockFastHash.substr(0, 6), job.height, miner.login, miner.ip, result]
|
[blockFastHash.substr(0, 6), job.height, miner.login, miner.ip, result]
|
||||||
@@ -1224,8 +1223,9 @@ function processShare (miner, job, blockTemplate, params) {
|
|||||||
recordShareData(miner, job, hashDiff.toString(), false, null, shareType, null, null);
|
recordShareData(miner, job, hashDiff.toString(), false, null, shareType, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!job.childHeight)
|
if (!job.childHeight) {
|
||||||
return true
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
var childBlockTemplate = blockTemplate.childBlockTemplate;
|
var childBlockTemplate = blockTemplate.childBlockTemplate;
|
||||||
|
|
||||||
@@ -1244,8 +1244,7 @@ function processShare (miner, job, blockTemplate, params) {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
let onChildSuccess = (result) => {
|
let onChildSuccess = (result) => {
|
||||||
let blockFastHash = utils.cnUtil.get_block_id(mergedBuffer, 2)
|
let blockFastHash = utils.cnUtil.get_block_id(mergedBuffer, 2).toString('hex')
|
||||||
.toString('hex')
|
|
||||||
log('info', logSystem,
|
log('info', logSystem,
|
||||||
'Child Block %s found at height %d by miner %s@%s - submit result: %j',
|
'Child Block %s found at height %d by miner %s@%s - submit result: %j',
|
||||||
[blockFastHash.substr(0, 6), job.childHeight, miner.workerName, miner.ip, result]);
|
[blockFastHash.substr(0, 6), job.childHeight, miner.workerName, miner.ip, result]);
|
||||||
|
|||||||
Reference in New Issue
Block a user