Update paymentProcessor.js

Include balances owed in total owed checks.
This commit is contained in:
hellcatz 2017-09-03 17:05:48 -07:00 committed by GitHub
parent 8d463f5c37
commit 7233c9b726
1 changed files with 5 additions and 1 deletions

View File

@ -860,7 +860,11 @@ function SetupForPool(logger, poolOptions, setupFinished){
totalOwed = totalOwed + coinsToSatoshies(rounds[i].reward) - feeSatoshi;
}
}
// also include balances owed
for (var w in workers) {
var worker = workers[w];
totalOwed = totalOwed + (worker.balance||0);
}
// check if we have enough tAddress funds to begin payment processing
listUnspent(null, notAddr, minConfPayout, false, function (error, tBalance){
if (error) {