From f4ba7dc81760bc836970d4b8baa31e0c72f55258 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Thu, 2 Jul 2015 07:39:24 -0400 Subject: [PATCH] update mining script to take to work with 0.9.35 --- js/mine.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/mine.js b/js/mine.js index 383dc152..8bf00e01 100644 --- a/js/mine.js +++ b/js/mine.js @@ -11,14 +11,14 @@ setInterval(function() { var minimalAmount = (web3.eth.getBalance(web3.eth.coinbase) >= 15000000000000000000); var pendingTransactions = function() { - if (web3.eth.pendingTransactions === undefined) { + if (web3.eth.pendingTransactions === undefined || web3.eth.pendingTransactions === null) { return txpool.status.pending || txpool.status.queued; } else if (typeof web3.eth.pendingTransactions === "function") { return web3.eth.pendingTransactions().length > 0; } else { - return web3.eth.getBlock('pending').transactions.length > 0; + return web3.eth.pendingTransactions.length > 0 || web3.eth.getBlock('pending').transactions.length > 0; } }