From b9cf9fe3e3413b8bfbef1108a5bc0d0b21774272 Mon Sep 17 00:00:00 2001 From: Alexander Blair Date: Tue, 27 Jun 2017 06:04:01 -0700 Subject: [PATCH] Update to fix roundHashes not being set as part of the dataset. --- lib/local_comms.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/local_comms.js b/lib/local_comms.js index a7efbb0..cb996e4 100644 --- a/lib/local_comms.js +++ b/lib/local_comms.js @@ -255,6 +255,11 @@ function Database(){ json_cache.totalHashes = cachedData[key].totalHashes; json_cache.goodShares = cachedData[key].goodShares; } + if (cachedData[key].hasOwnProperty('roundHashes') && json_cache.hasOwnProperty('roundHashes')){ + json_cache.roundHashes += cachedData[key].roundHashes; + } else { + json_cache.roundHashes = cachedData[key].roundHashes; + } txn.putString(global.database.cacheDB, key, JSON.stringify(json_cache)); } }