From b3e9619c0334bd634537a93e8c76bb216117dc53 Mon Sep 17 00:00:00 2001 From: joeuhren <46763106+joeuhren@users.noreply.github.com> Date: Sun, 22 Nov 2020 16:07:20 -0700 Subject: [PATCH] Fix getdifficulty --- lib/explorer.js | 2 +- routes/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/explorer.js b/lib/explorer.js index 45f86d3..56452cd 100644 --- a/lib/explorer.js +++ b/lib/explorer.js @@ -130,7 +130,7 @@ module.exports = { get_difficulty: function(cb) { if (settings.use_rpc) { - client.cmd([{method:'getdifficulty', params: [parseInt(height)]}], function(err, response){ + client.cmd([{method:'getdifficulty', params: []}], function(err, response){ if (err) return cb('There was an error. Check your console.'); else diff --git a/routes/index.js b/routes/index.js index 7b610e9..dae8b52 100644 --- a/routes/index.js +++ b/routes/index.js @@ -281,7 +281,7 @@ router.get('/qr/:string', function(req, res) { router.get('/ext/summary', function(req, res) { lib.get_difficulty(function(difficulty) { - difficultyHybrid = '' + difficultyHybrid = ''; if (difficulty['proof-of-work']) { if (settings.index.difficulty == 'Hybrid') { difficultyHybrid = 'POS: ' + difficulty['proof-of-stake'];