mine a minimal amount

This commit is contained in:
Iuri Matias 2015-05-24 09:36:19 -04:00
parent eda7734bdd
commit 8749a63dd8
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,8 @@
setInterval(function() {
if(web3.eth.pendingTransactions().length > 0 && !web3.eth.mining) {
var minimalAmount = (web3.eth.getBalance(web3.eth.coinbase) >= 1500000000000000000);
if(!web3.eth.mining && (!minimalAmount || web3.eth.pendingTransactions().length > 0)) {
admin.miner.start();
}
else {