mirror of https://github.com/embarklabs/embark.git
mine when a transaction comes in
This commit is contained in:
parent
fa17f72df1
commit
a4fe027fb3
|
@ -0,0 +1,10 @@
|
||||||
|
|
||||||
|
setInterval(function() {
|
||||||
|
if(web3.eth.pendingTransactions().length > 0 && !web3.eth.mining) {
|
||||||
|
admin.miner.start();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
admin.miner.stop();
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
|
Loading…
Reference in New Issue