diff options
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index ef129d71c..4ba3acc37 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -51,6 +51,7 @@ namespace cryptonote command_line::add_arg(desc, arg_rpc_bind_ip); command_line::add_arg(desc, arg_rpc_bind_port); command_line::add_arg(desc, arg_testnet_rpc_bind_port); + command_line::add_arg(desc, arg_restricted_rpc); } //------------------------------------------------------------------------------------------------------------------------------ core_rpc_server::core_rpc_server( @@ -69,6 +70,7 @@ namespace cryptonote m_bind_ip = command_line::get_arg(vm, arg_rpc_bind_ip); m_port = command_line::get_arg(vm, p2p_bind_arg); + m_restricted = command_line::get_arg(vm, arg_restricted_rpc); return true; } //------------------------------------------------------------------------------------------------------------------------------ @@ -1001,4 +1003,10 @@ namespace cryptonote , std::to_string(config::testnet::RPC_DEFAULT_PORT) }; + const command_line::arg_descriptor<bool> core_rpc_server::arg_restricted_rpc = { + "restricted-rpc" + , "Restrict RPC to view only commands" + , false + }; + } // namespace cryptonote |