fix payment redis final cleanout issue - possible double spending - optimized - fixed
This commit is contained in:
parent
1f15c418c8
commit
a9132319cc
|
@ -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);
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue