Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display warning for gas price #872

Merged
merged 2 commits into from Sep 19, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/tests/test.js
Expand Up @@ -188,6 +188,7 @@ class Test {
}
return self.connectToIpcNode(cb);
}
self.showNodeHttpWarning();
cb();
}
], callback);
Expand All @@ -200,10 +201,17 @@ class Test {
return cb();
}
this.options.node = node;
this.showNodeHttpWarning();
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");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we maybe add a possible solution for the user? For example,

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.

What do you think of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better indeed, I updated the text

}
}

onReady(callback) {
const self = this;
if (this.ready) {
Expand Down