fix payment redis final cleanout issue - possible double spending - optimized - fixed

This commit is contained in:
Eugene@ubuntu 2014-04-03 00:43:58 +04:00
parent 1f15c418c8
commit a9132319cc
1 changed files with 2 additions and 5 deletions

View File

@ -470,27 +470,24 @@ function SetupForPool(logger, poolOptions, setupFinished){
if (orphanMergeCommands.length > 0)
finalRedisCommands = finalRedisCommands.concat(orphanMergeCommands);
if (balanceUpdateCommands.length > 0)
finalRedisCommands = finalRedisCommands.concat(balanceUpdateCommands);
if (workerPayoutsCommand.length > 0)
finalRedisCommands = finalRedisCommands.concat(workerPayoutsCommand);
if (roundsToDelete.length > 0)
finalRedisCommands.push(['del'].concat(roundsToDelete));
if (toBePaid !== 0)
finalRedisCommands.push(['hincrbyfloat', coin + '_stats', 'totalPaid', (toBePaid / magnitude).toFixed(coinPrecision)]);
finalRedisCommands.push(['del', coin + '_finalRedisCommands']);
finalRedisCommands.push(['bgsave']);
callback(null, magnitude, workerPayments, finalRedisCommands);
});
},