mirror of https://github.com/embarklabs/embark.git
mine a minimal amount
This commit is contained in:
parent
eda7734bdd
commit
8749a63dd8
|
@ -1,6 +1,8 @@
|
||||||
|
|
||||||
setInterval(function() {
|
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();
|
admin.miner.start();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue