Change miner trust probability & penalty if wrong share submitted
parent
c822d8a53d
commit
a03834f153
10
lib/pool.js
10
lib/pool.js
|
@ -536,10 +536,7 @@ function handleMinerMethod(method, params, ip, portData, sendReply, pushMessage)
|
|||
|
||||
var shareAccepted = processShare(miner, job, blockTemplate, params.nonce, params.result);
|
||||
miner.checkBan(shareAccepted);
|
||||
if (!shareAccepted){
|
||||
sendReply('Low difficulty share');
|
||||
return;
|
||||
}
|
||||
|
||||
if (shareTrustEnabled){
|
||||
if (shareAccepted){
|
||||
miner.trust.probability -= shareTrustStepFloat;
|
||||
|
@ -554,6 +551,11 @@ function handleMinerMethod(method, params, ip, portData, sendReply, pushMessage)
|
|||
miner.trust.penalty = config.poolServer.shareTrust.penalty;
|
||||
}
|
||||
}
|
||||
|
||||
if (!shareAccepted){
|
||||
sendReply('Low difficulty share');
|
||||
return;
|
||||
}
|
||||
|
||||
var now = Date.now() / 1000 | 0;
|
||||
miner.shareTimeRing.append(now - miner.lastShareTime);
|
||||
|
|
Loading…
Reference in New Issue