mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
tools: cleanup
This commit is contained in:
1 parent
47ba0415ca
commit
c41ee417fb
4 files changed
+6
-6
No files matched your search
+1
-1
@@ -67,7 +67,7 @@ main(int argc, char **argv)
|
||||
if (not params.bootstrap.empty())
|
||||
dht.bootstrap(params.bootstrap);
|
||||
|
||||
print_node_info(dht.getNodeInfo(), params);
|
||||
print_node_info(dht.getNodeInfo());
|
||||
std::cout << " type 'c {hash}' to join a channel" << std::endl << std::endl;
|
||||
|
||||
bool connected {false};
|
||||
|
||||
+2
-2
@@ -114,7 +114,7 @@ void cmd_loop(std::shared_ptr<DhtRunner>& node, dht_params& params
|
||||
#endif
|
||||
)
|
||||
{
|
||||
print_node_info(node->getNodeInfo(), params);
|
||||
print_node_info(node->getNodeInfo());
|
||||
std::cout << " (type 'h' or 'help' for a list of possible commands)" << std::endl << std::endl;
|
||||
|
||||
#ifndef WIN32_NATIVE
|
||||
@@ -144,7 +144,7 @@ void cmd_loop(std::shared_ptr<DhtRunner>& node, dht_params& params
|
||||
continue;
|
||||
} else if (op == "ll") {
|
||||
node->getNodeInfo([&](const std::shared_ptr<dht::NodeInfo>& nodeInfo) {
|
||||
print_node_info(*nodeInfo, params);
|
||||
print_node_info(*nodeInfo);
|
||||
std::cout << nodeInfo->ongoing_ops << " ongoing operations" << std::endl;
|
||||
std::cout << "IPv4 stats:" << std::endl;
|
||||
std::cout << nodeInfo->ipv4.toString() << std::endl;
|
||||
|
||||
@@ -94,7 +94,7 @@ main(int argc, char **argv)
|
||||
if (not params.bootstrap.empty())
|
||||
dht.bootstrap(params.bootstrap);
|
||||
|
||||
print_node_info(dht.getNodeInfo(), params);
|
||||
print_node_info(dht.getNodeInfo());
|
||||
std::cout << "Scanning network..." << std::endl;
|
||||
auto all_nodes = std::make_shared<NodeSet>();
|
||||
|
||||
|
||||
@@ -191,13 +191,13 @@ getDhtConfig(dht_params& params)
|
||||
return {std::move(config), std::move(context)};
|
||||
}
|
||||
|
||||
void print_node_info(const dht::NodeInfo& info, const dht_params& params) {
|
||||
void print_node_info(const dht::NodeInfo& info) {
|
||||
std::cout << "OpenDHT node " << info.node_id << " running on ";
|
||||
if (info.bound4 == info.bound6)
|
||||
std::cout << "port " << info.bound4 << std::endl;
|
||||
else
|
||||
std::cout << "IPv4 port " << info.bound4 << ", IPv6 port " << info.bound6 << std::endl;
|
||||
if (params.id.first)
|
||||
if (info.id)
|
||||
std::cout << "Public key ID " << info.id << std::endl;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user