diff --git a/app/api/coreApi.js b/app/api/coreApi.js index 26a7fcf..1666551 100644 --- a/app/api/coreApi.js +++ b/app/api/coreApi.js @@ -83,7 +83,7 @@ function getUptimeSeconds() { } function getChainTxStats(blockCount) { - return tryCacheThenRpcApi(miscCache, "getChainTxStats-" + blockCount, 120000, function() { + return tryCacheThenRpcApi(miscCache, "getChainTxStats-" + blockCount, 1200000, function() { return rpcApi.getChainTxStats(blockCount); }); } diff --git a/routes/baseActionsRouter.js b/routes/baseActionsRouter.js index 924a582..6cc46db 100644 --- a/routes/baseActionsRouter.js +++ b/routes/baseActionsRouter.js @@ -50,7 +50,7 @@ router.get("/", function(req, res) { if (getblockchaininfo.chain !== 'regtest') { var targetBlocksPerDay = 24 * 60 * 60 / global.coinConfig.targetBlockTimeSeconds; - promises.push(coreApi.getTxCountStats(72, -targetBlocksPerDay, "latest")); + promises.push(coreApi.getTxCountStats(targetBlocksPerDay / 4, -targetBlocksPerDay, "latest")); var chainTxStatsIntervals = [ targetBlocksPerDay, targetBlocksPerDay * 7, targetBlocksPerDay * 30, targetBlocksPerDay * 365 ] .filter(numBlocks => numBlocks <= getblockchaininfo.blocks);