diff --git a/js/mine.js b/js/mine.js new file mode 100644 index 00000000..59f40afc --- /dev/null +++ b/js/mine.js @@ -0,0 +1,10 @@ + +setInterval(function() { + if(web3.eth.pendingTransactions().length > 0 && !web3.eth.mining) { + admin.miner.start(); + } + else { + admin.miner.stop(); + } +}, 1000) +