fix when using mining script

This commit is contained in:
Jonathan Rainville 2018-06-28 10:37:10 -04:00
parent f29760e051
commit e7eee572f4
2 changed files with 4 additions and 4 deletions

View File

@ -196,7 +196,7 @@ Blockchain.prototype.readyCallback = function() {
this.onReadyCallback();
}
if (this.config.mineWhenNeeded) {
if (this.config.mineWhenNeeded && !this.isDev) {
const GethMiner = require('./miner');
this.miner = new GethMiner();
}

View File

@ -67,8 +67,8 @@ exports.serve = function(ipc, host, port, ws){
ws: ws
});
proxy.on('error', function () {
console.error(__("Error forwarding requests to blockchain/simulator"));
proxy.on('error', function (e) {
console.error(__("Error forwarding requests to blockchain/simulator"), e);
});
proxy.on('proxyRes', (proxyRes) => {
@ -79,7 +79,7 @@ exports.serve = function(ipc, host, port, ws){
if(resBody){
parseResponse(ipc, resBody);
}
});
});
});
let server = http.createServer((req, res) => {