-
Notifications
You must be signed in to change notification settings - Fork 231
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
testclient: setChainParams #177
Conversation
@@ -32,6 +33,29 @@ using namespace jsonrpc; | |||
|
|||
Test::Test(eth::Client& _eth): m_eth(_eth) {} | |||
|
|||
bool Test::test_setChainParams(const Json::Value ¶m1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these tests run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean should it belong to test section?
I think so. Normally node is started with either --genesis or --config section
This feature is experimental and for test purpose only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, somehow I thought this was a unit test...
Please move the const
after the type.
}, [&](Address const& _a) { return ICAP(_a).encoded() + " (" + _a.abridged() + ")"; } | ||
) + "\nEnter yes/no/always (always to this address): ", {"yes", "n", "N", "no", "NO", "always"}); | ||
string r; | ||
if (testingMode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the following is both simpler and safer:
std::function<bool(TransactionSkeleton const&, bool)> authenticator;
if (testingMode)
authenticator = [](TransactionSkeleton const&, bool) -> bool { return true; }
else
authenticator = /* as it was before */
if (testingMode) | ||
authenticator = [](TransactionSkeleton const&, bool) -> bool { return true; }; | ||
else | ||
authenticator = [&](TransactionSkeleton const& _t, bool isProxy) -> bool { | ||
// "unlockAccount" functionality is done in the AccountHolder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still has to be properly indented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean put it inside {} ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, shift the body of the function one tab to the right.
Please merge after indenting the function. |
connects to ethereum/webthree-umbrella#542