mirror of https://github.com/BTCPrivate/z-nomp.git
Merge pull request #31 from joshuayabut/#31,-learngitnow
Update paymentProcessor.js
This commit is contained in:
commit
c2a57fb8de
|
@ -164,7 +164,7 @@ function SetupForPool(logger, poolOptions, setupFinished){
|
||||||
else {
|
else {
|
||||||
var tBalance = 0;
|
var tBalance = 0;
|
||||||
for (var i = 0, len = result[0].response.length; i < len; i++) {
|
for (var i = 0, len = result[0].response.length; i < len; i++) {
|
||||||
tBalance = Number(tBalance + (result[0].response[i].amount * 100000000)).toFixed(0);
|
tBalance = tBalance + Number((result[0].response[i].amount * magnitude));
|
||||||
}
|
}
|
||||||
logger.debug(logSystem, logComponent, addr + ' contains a balance of: ' + (tBalance / magnitude));
|
logger.debug(logSystem, logComponent, addr + ' contains a balance of: ' + (tBalance / magnitude));
|
||||||
callback(null, tBalance);
|
callback(null, tBalance);
|
||||||
|
@ -509,7 +509,7 @@ function SetupForPool(logger, poolOptions, setupFinished){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
daemon.cmd('sendmany', [addressAccount || '', addressAmounts], function (result) {
|
daemon.cmd('sendmany', [addressAccount, addressAmounts], function (result) {
|
||||||
//Check if payments failed because wallet doesn't have enough coins to pay for tx fees
|
//Check if payments failed because wallet doesn't have enough coins to pay for tx fees
|
||||||
if (result.error && result.error.code === -6) {
|
if (result.error && result.error.code === -6) {
|
||||||
var higherPercent = withholdPercent + 0.01;
|
var higherPercent = withholdPercent + 0.01;
|
||||||
|
@ -588,7 +588,7 @@ function SetupForPool(logger, poolOptions, setupFinished){
|
||||||
return;
|
return;
|
||||||
case 'generate':
|
case 'generate':
|
||||||
movePendingCommands.push(['smove', coin + ':blocksPending', coin + ':blocksConfirmed', r.serialized]);
|
movePendingCommands.push(['smove', coin + ':blocksPending', coin + ':blocksConfirmed', r.serialized]);
|
||||||
roundsToDelete.push(coin + ':shares:round' + r.height);
|
//roundsToDelete.push(coin + ':shares:round' + r.height);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue