From dc679dbab5a6be6db65d20a3edc217ed63f6a7ac Mon Sep 17 00:00:00 2001 From: Marko Simovic Date: Wed, 19 Mar 2014 22:19:42 -0400 Subject: [PATCH 1/2] Interactive help now has command to list peers --- eth/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eth/main.cpp b/eth/main.cpp index cbae6cab6..dce30112c 100644 --- a/eth/main.cpp +++ b/eth/main.cpp @@ -84,6 +84,7 @@ void interactiveHelp() << " secret Gives the current secret" << endl << " block Gives the current block height." << endl << " balance Gives the current balance." << endl + << " peers List the peers that are connected" << endl << " transact Executes a given transaction." << endl << " send Executes a given transaction with current secret." << endl << " inspect Dumps a contract to /.evm." << endl @@ -269,6 +270,13 @@ int main(int argc, char** argv) cout << "Current block # " << n << endl; cout << "===" << endl; } + else if (cmd == "peers") + { + for(auto it : c.peers()) + cout << it.host << ":" << it.port << ", " << it.clientVersion << ", " + << std::chrono::duration_cast(it.lastPing).count() << "ms" + << endl; + } else if (cmd == "balance") { u256 balance = c.state().balance(us.address()); From 9dcfc6ed8fad31a5dfcf87e0fd88617f5c21b199 Mon Sep 17 00:00:00 2001 From: Marko Simovic Date: Wed, 26 Mar 2014 01:21:58 -0400 Subject: [PATCH 2/2] Minor styling changes --- eth/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/main.cpp b/eth/main.cpp index dce30112c..ea57f0f89 100644 --- a/eth/main.cpp +++ b/eth/main.cpp @@ -272,7 +272,7 @@ int main(int argc, char** argv) } else if (cmd == "peers") { - for(auto it : c.peers()) + for (auto it: c.peers()) cout << it.host << ":" << it.port << ", " << it.clientVersion << ", " << std::chrono::duration_cast(it.lastPing).count() << "ms" << endl;