mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 12:28:42 +00:00
dht: getSearchLog for a specific search
This commit is contained in:
1 parent
2b3f63443f
commit
2ab756906d
5 files changed
+55
-18
No files matched your search
+10
-4
@@ -53,8 +53,8 @@ void print_help() {
|
||||
|
||||
std::cout << std::endl << "Node information:" << std::endl
|
||||
<< " ll Print basic information and stats about the current node." << std::endl
|
||||
<< " ls Print basic information about current searches." << std::endl
|
||||
<< " ld Print basic information about currenty stored values on this node." << std::endl
|
||||
<< " ls [key] Print basic information about current search(es)." << std::endl
|
||||
<< " ld [key] Print basic information about currenty stored values on this node (or key)." << std::endl
|
||||
<< " lr Print the full current routing table of this node" << std::endl;
|
||||
|
||||
std::cout << std::endl << "Operations on the DHT:" << std::endl
|
||||
@@ -123,8 +123,14 @@ void cmd_loop(std::shared_ptr<DhtRunner>& dht, dht_params& params)
|
||||
std::cout << dht->getStorageLog(filter) << std::endl;
|
||||
continue;
|
||||
} else if (op == "ls") {
|
||||
std::cout << "Searches:" << std::endl;
|
||||
std::cout << dht->getSearchesLog() << std::endl;
|
||||
iss >> idstr;
|
||||
InfoHash filter(idstr);
|
||||
if (filter == InfoHash{}) {
|
||||
std::cout << "Searches:" << std::endl;
|
||||
std::cout << dht->getSearchesLog() << std::endl;
|
||||
} else {
|
||||
std::cout << dht->getSearchLog(filter) << std::endl;
|
||||
}
|
||||
continue;
|
||||
} else if (op == "la") {
|
||||
std::cout << "Reported public addresses:" << std::endl;
|
||||
|
||||
Reference in new issue
Block a user