await proxy just before createFundAndUnlockAccounts
This commit is contained in:
parent
35c772d727
commit
aae7954020
|
@ -153,13 +153,10 @@ Blockchain.prototype.run = function() {
|
||||||
},
|
},
|
||||||
function getMainCommand(next) {
|
function getMainCommand(next) {
|
||||||
self.client.mainCommand(address, function(cmd, args) {
|
self.client.mainCommand(address, function(cmd, args) {
|
||||||
if (self.config.proxy) {
|
|
||||||
self.setupProxy();
|
|
||||||
}
|
|
||||||
next(null, cmd, args);
|
next(null, cmd, args);
|
||||||
}, true);
|
}, true);
|
||||||
}
|
}
|
||||||
], function (err, cmd, args) {
|
], async function (err, cmd, args) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(err.message);
|
console.error(err.message);
|
||||||
return;
|
return;
|
||||||
|
@ -182,10 +179,13 @@ Blockchain.prototype.run = function() {
|
||||||
console.error(`Geth error: ${data}`);
|
console.error(`Geth error: ${data}`);
|
||||||
});
|
});
|
||||||
// Geth logs appear in stderr somehow
|
// Geth logs appear in stderr somehow
|
||||||
self.child.stderr.on('data', (data) => {
|
self.child.stderr.on('data', async (data) => {
|
||||||
data = data.toString();
|
data = data.toString();
|
||||||
if (!self.readyCalled && data.indexOf('WebSocket endpoint opened') > -1) {
|
if (!self.readyCalled && data.indexOf('WebSocket endpoint opened') > -1) {
|
||||||
if (self.isDev) {
|
if (self.isDev) {
|
||||||
|
if (self.config.proxy) {
|
||||||
|
await self.setupProxy();
|
||||||
|
}
|
||||||
self.createFundAndUnlockAccounts((err) => {
|
self.createFundAndUnlockAccounts((err) => {
|
||||||
// TODO: this is never called!
|
// TODO: this is never called!
|
||||||
if(err) console.error('Error creating, unlocking, and funding accounts', err);
|
if(err) console.error('Error creating, unlocking, and funding accounts', err);
|
||||||
|
|
Loading…
Reference in New Issue