mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-02 17:03:36 +00:00
miner stop config threads
This commit is contained in:
parent
32ef27212b
commit
6559cfdd5c
@ -39,7 +39,7 @@
|
|||||||
miner_obj.start(config.threads);
|
miner_obj.start(config.threads);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
miner_obj.stop();
|
miner_obj.stop(config.threads);
|
||||||
|
|
||||||
fundAccount(config, miner_obj, function () {
|
fundAccount(config, miner_obj, function () {
|
||||||
if (config.mine_periodically) start_periodic_mining(config, miner_obj);
|
if (config.mine_periodically) start_periodic_mining(config, miner_obj);
|
||||||
@ -64,7 +64,7 @@
|
|||||||
console.log("== Account funded");
|
console.log("== Account funded");
|
||||||
|
|
||||||
blockWatcher.stopWatching();
|
blockWatcher.stopWatching();
|
||||||
miner_obj.stop();
|
miner_obj.stop(config.threads);
|
||||||
cb();
|
cb();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -106,7 +106,7 @@
|
|||||||
next_block_in_ms = (config.interval_ms - ms_since_block);
|
next_block_in_ms = (config.interval_ms - ms_since_block);
|
||||||
}
|
}
|
||||||
|
|
||||||
miner_obj.stop();
|
miner_obj.stop(config.threads);
|
||||||
console.log("== Looking for next block in " + next_block_in_ms + "ms");
|
console.log("== Looking for next block in " + next_block_in_ms + "ms");
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
@ -130,7 +130,7 @@
|
|||||||
web3.eth.filter("latest").watch(function () {
|
web3.eth.filter("latest").watch(function () {
|
||||||
if (!pendingTransactions()) {
|
if (!pendingTransactions()) {
|
||||||
console.log("== No transactions left. Stopping miner...");
|
console.log("== No transactions left. Stopping miner...");
|
||||||
miner_obj.stop();
|
miner_obj.stop(config.threads);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user