mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 06:25:57 +00:00
mine when a transaction comes in
This commit is contained in:
parent
fa17f72df1
commit
a4fe027fb3
10
js/mine.js
Normal file
10
js/mine.js
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
setInterval(function() {
|
||||
if(web3.eth.pendingTransactions().length > 0 && !web3.eth.mining) {
|
||||
admin.miner.start();
|
||||
}
|
||||
else {
|
||||
admin.miner.stop();
|
||||
}
|
||||
}, 1000)
|
||||
|
Loading…
x
Reference in New Issue
Block a user