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

testclient: setChainParams #177

Merged
merged 2 commits into from
Jun 9, 2016
Merged

Conversation

winsvega
Copy link
Contributor

@winsvega winsvega commented Jun 1, 2016

@@ -32,6 +33,29 @@ using namespace jsonrpc;

Test::Test(eth::Client& _eth): m_eth(_eth) {}

bool Test::test_setChainParams(const Json::Value &param1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these tests run?

Copy link
Contributor Author

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.

Copy link
Contributor

@chriseth chriseth Jun 3, 2016

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)
Copy link
Contributor

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.
Copy link
Contributor

@chriseth chriseth Jun 8, 2016

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.

Copy link
Contributor Author

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 {} ?

Copy link
Contributor

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.

@chriseth
Copy link
Contributor

chriseth commented Jun 8, 2016

Please merge after indenting the function.

@winsvega winsvega merged commit 7068e23 into ethereum:develop Jun 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants