Skip to content

Commit

Permalink
Fixed steep drop-off for PPLNT and put pplnt value in json
Browse files Browse the repository at this point in the history
  • Loading branch information
Oink70 committed Nov 15, 2022
1 parent 242e760 commit 366ff90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/paymentProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ function SetupForPool(logger, poolOptions, setupFinished){
if (workerTimes[address] != null && parseFloat(workerTimes[address]) > 0) {
var timePeriod = roundTo(parseFloat(workerTimes[address] || 1) / maxTime , 2);
if (timePeriod > 0 && timePeriod < pplntTimeQualify) {
var lost = shares - (shares * timePeriod);
var lost = shares - (shares * timePeriod / pplntTimeQualify);
sharesLost += lost;
shares = Math.max(shares - lost, 0);
}
Expand Down Expand Up @@ -1018,7 +1018,7 @@ function SetupForPool(logger, poolOptions, setupFinished){
if (workerTimes[address] != null && parseFloat(workerTimes[address]) > 0) {
var timePeriod = roundTo(parseFloat(workerTimes[address] || 1) / maxTime , 2);
if (timePeriod > 0 && timePeriod < pplntTimeQualify) {
var lost = shares - (shares * timePeriod);
var lost = shares - (shares * timePeriod / pplntTimeQualify);
sharesLost += lost;
shares = Math.max(shares - lost, 0);
logger.warning(logSystem, logComponent, 'PPLNT: Reduced shares for '+workerAddress+' round:' + round.height + ' maxTime:'+maxTime+'sec timePeriod:'+roundTo(timePeriod,6)+' shares:'+tshares+' lost:'+lost+' new:'+shares);
Expand Down
2 changes: 2 additions & 0 deletions pool_configs/examples/vrsc.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
"enabled": true,
"paymentMode": "prop",
"_comment_paymentMode":"prop, pplnt",
"pplnt": 51,
"_comment_pplnt": "If pplnt is active and clients have mined less that this part, their shares are slashed."
"paymentInterval": 120,
"_comment_paymentInterval": "Interval in seconds to check and perform payments.",
"minimumPayment": 1,
Expand Down

0 comments on commit 366ff90

Please sign in to comment.