aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/daemon.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-11-29 20:05:26 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-11-29 20:07:01 +0000
commit5f2a32c15ab0eef7bf0e0a0f9cd1362a1c456a22 (patch)
treecec0e5fbf57e2a8d6283757ef977d691101dea25 /src/daemon/daemon.cpp
parentMerge pull request #6174 (diff)
downloadmonero-5f2a32c15ab0eef7bf0e0a0f9cd1362a1c456a22.tar.xz
daemon: run with -rpc-payment-address and --rpc-restricted-bind-port
Diffstat (limited to '')
-rw-r--r--src/daemon/daemon.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp
index cb96b37b6..056f2f320 100644
--- a/src/daemon/daemon.cpp
+++ b/src/daemon/daemon.cpp
@@ -78,13 +78,14 @@ public:
const auto restricted = command_line::get_arg(vm, cryptonote::core_rpc_server::arg_restricted_rpc);
const auto main_rpc_port = command_line::get_arg(vm, cryptonote::core_rpc_server::arg_rpc_bind_port);
- rpcs.emplace_back(new t_rpc{vm, core, p2p, restricted, main_rpc_port, "core"});
+ const auto restricted_rpc_port_arg = cryptonote::core_rpc_server::arg_rpc_restricted_bind_port;
+ const bool has_restricted_rpc_port_arg = !command_line::is_arg_defaulted(vm, restricted_rpc_port_arg);
+ rpcs.emplace_back(new t_rpc{vm, core, p2p, restricted, main_rpc_port, "core", !has_restricted_rpc_port_arg});
- auto restricted_rpc_port_arg = cryptonote::core_rpc_server::arg_rpc_restricted_bind_port;
- if(!command_line::is_arg_defaulted(vm, restricted_rpc_port_arg))
+ if(has_restricted_rpc_port_arg)
{
auto restricted_rpc_port = command_line::get_arg(vm, restricted_rpc_port_arg);
- rpcs.emplace_back(new t_rpc{vm, core, p2p, true, restricted_rpc_port, "restricted"});
+ rpcs.emplace_back(new t_rpc{vm, core, p2p, true, restricted_rpc_port, "restricted", true});
}
}
};