Update pool.js

This commit is contained in:
Interchained
2021-01-04 13:55:58 -05:00
committed by GitHub
parent 1c7d1ed34f
commit c123ed9473

View File

@@ -1208,8 +1208,7 @@ function processShare (miner, job, blockTemplate, params) {
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]);
} else {
let blockFastHash = utils.cnUtil.get_block_id(shareBuffer, cnBlobType)
.toString('hex');
let blockFastHash = utils.cnUtil.get_block_id(shareBuffer, cnBlobType).toString('hex');
log('info', logSystem,
'Block %s found at height %d by miner %s@%s - submit result: %j',
[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);
}
if (!job.childHeight)
return true
if (!job.childHeight) {
return true;
}
var childBlockTemplate = blockTemplate.childBlockTemplate;
@@ -1244,8 +1244,7 @@ function processShare (miner, job, blockTemplate, params) {
} else {
let onChildSuccess = (result) => {
let blockFastHash = utils.cnUtil.get_block_id(mergedBuffer, 2)
.toString('hex')
let blockFastHash = utils.cnUtil.get_block_id(mergedBuffer, 2).toString('hex')
log('info', logSystem,
'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]);