aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/command_parser_executor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/command_parser_executor.cpp')
-rw-r--r--src/daemon/command_parser_executor.cpp28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp
index 924447701..d47823735 100644
--- a/src/daemon/command_parser_executor.cpp
+++ b/src/daemon/command_parser_executor.cpp
@@ -51,12 +51,14 @@ bool t_command_parser_executor::print_peer_list(const std::vector<std::string>&
{
if (args.size() > 3)
{
- std::cout << "use: print_pl [white] [gray] [<limit>]" << std::endl;
+ std::cout << "use: print_pl [white] [gray] [<limit>] [pruned] [publicrpc]" << std::endl;
return true;
}
bool white = false;
bool gray = false;
+ bool pruned = false;
+ bool publicrpc = false;
size_t limit = 0;
for (size_t i = 0; i < args.size(); ++i)
{
@@ -68,6 +70,14 @@ bool t_command_parser_executor::print_peer_list(const std::vector<std::string>&
{
gray = true;
}
+ else if (args[i] == "pruned")
+ {
+ pruned = true;
+ }
+ else if (args[i] == "publicrpc")
+ {
+ publicrpc = true;
+ }
else if (!epee::string_tools::get_xtype_from_string(limit, args[i]))
{
std::cout << "unexpected argument: " << args[i] << std::endl;
@@ -76,7 +86,7 @@ bool t_command_parser_executor::print_peer_list(const std::vector<std::string>&
}
const bool print_both = !white && !gray;
- return m_executor.print_peer_list(white | print_both, gray | print_both, limit);
+ return m_executor.print_peer_list(white | print_both, gray | print_both, limit, pruned, publicrpc);
}
bool t_command_parser_executor::print_peer_list_stats(const std::vector<std::string>& args)
@@ -813,4 +823,18 @@ bool t_command_parser_executor::check_blockchain_pruning(const std::vector<std::
return m_executor.check_blockchain_pruning();
}
+bool t_command_parser_executor::set_bootstrap_daemon(const std::vector<std::string>& args)
+{
+ const size_t args_count = args.size();
+ if (args_count < 1 || args_count > 3)
+ {
+ return false;
+ }
+
+ return m_executor.set_bootstrap_daemon(
+ args[0] != "none" ? args[0] : std::string(),
+ args_count > 1 ? args[1] : std::string(),
+ args_count > 2 ? args[2] : std::string());
+}
+
} // namespace daemonize