Merge pull request #872 from embark-framework/feature/warning-for-gas

Display warning for gas price
This commit is contained in:
Iuri Matias 2018-09-19 13:57:17 -04:00 committed by GitHub
commit b817c0f012
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -188,6 +188,7 @@ class Test {
} }
return self.connectToIpcNode(cb); return self.connectToIpcNode(cb);
} }
self.showNodeHttpWarning();
cb(); cb();
} }
], callback); ], callback);
@ -200,10 +201,18 @@ class Test {
return cb(); return cb();
} }
this.options.node = node; this.options.node = node;
this.showNodeHttpWarning();
cb(); cb();
}); });
} }
showNodeHttpWarning() {
if (this.options.node.startsWith('http')) {
this.engine.logger.warn("You are using http to connect to the node, as a result the gas details won't be correct." +
" For correct gas details reporting, please use a websockets connection to your node.");
}
}
onReady(callback) { onReady(callback) {
const self = this; const self = this;
if (this.ready) { if (this.ready) {