Update to include roundHashes

Update to fix an API bug with identifiers
Moving payments that fail due to $$ to retry in 30 minutes - Need to block if it's payment ID based.
This commit is contained in:
Alexander Blair
2017-02-15 18:49:12 -08:00
parent aa0353868c
commit bf730fddbe
4 changed files with 38 additions and 8 deletions
+5 -2
View File
@@ -300,7 +300,7 @@ app.get('/miner/:address/payments', function (req, res) {
app.get('/miner/:address/stats/allWorkers', function (req, res) {
let address = req.params.address;
let identifiers = global.database.getCache(address + '_identifiers').sort();
let identifiers = global.database.getCache(address + '_identifiers')
let globalCache = global.database.getCache(address);
let returnData = {global: {
lts: Math.floor(globalCache.lastHash / 1000),
@@ -309,7 +309,10 @@ app.get('/miner/:address/stats/allWorkers', function (req, res) {
totalHash: globalCache.totalHashes
}};
let intCounter = 0;
identifiers.forEach(function(identifier){
if (identifiers === false){
return res.json(returnData);
}
identifiers.sort().forEach(function(identifier){
let cachedData = global.database.getCache(req.params.address+"_"+identifier);
returnData[identifier] = {
lts: Math.floor(cachedData.lastHash / 1000),