From c761631afdc666f5a78d1fa5f643c0fbfff4824e Mon Sep 17 00:00:00 2001 From: Dan Janosik Date: Thu, 28 May 2020 11:03:31 -0400 Subject: [PATCH] Close #214 Agree with @pointbiz that the blast of blockstats requests made on startup (to calculate 24hr volume) should be blocked on "slow devices". --- app.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app.js b/app.js index 81b71d1..ae3209f 100755 --- a/app.js +++ b/app.js @@ -296,6 +296,12 @@ function refreshUtxoSetSummary() { } function refreshNetworkVolumes() { + if (config.slowDeviceMode) { + debugLog("Skipping performance-intensive task: fetch last 24 hrs of blockstats to calculate transaction volume. This is skipped due to the flag 'slowDeviceMode' which defaults to 'true' to protect slow nodes. Set this flag to 'false' to enjoy UTXO set summary details."); + + return; + } + var cutoff1d = new Date().getTime() - (60 * 60 * 24 * 1000); var cutoff7d = new Date().getTime() - (60 * 60 * 24 * 7 * 1000);