From d99eee2571f60295b6fe3061433e1f84af60e9d7 Mon Sep 17 00:00:00 2001 From: Alexander Blair Date: Mon, 16 Oct 2017 09:41:53 -0700 Subject: [PATCH] Fixing another undef error. --- lib/worker.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/worker.js b/lib/worker.js index 8589dcb..fd4324a 100644 --- a/lib/worker.js +++ b/lib/worker.js @@ -432,6 +432,9 @@ function updatePoolInformation() { function updateBlockHeader() { global.support.rpcDaemon('getlastblockheader', [], function (body) { + if (typeof body.error !== 'undefined'){ + return console.error(`Issue getting last block header: ${JSON.stringify(body)}`); + } if (body.result && body.result.block_header.hash !== lastBlockHash) { lastBlockHash = body.result.block_header.hash; global.database.setCache('networkBlockInfo', {