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