aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/core_rpc_server.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-11-30 00:18:17 +0200
committerRiccardo Spagni <ric@spagni.net>2015-11-30 00:18:20 +0200
commit8a52cf4055d247dd4b162985c931e99683992e3c (patch)
tree7d7ac6c2c31033f04cd8ed8728de7d981351fdf7 /src/rpc/core_rpc_server.cpp
parentMerge pull request #504 (diff)
parentcore_rpc_server: add a --restricted-rpc option (diff)
downloadmonero-8a52cf4055d247dd4b162985c931e99683992e3c.tar.xz
Merge pull request #505
7574297 core_rpc_server: add a --restricted-rpc option (moneromooo-monero)
Diffstat (limited to 'src/rpc/core_rpc_server.cpp')
-rw-r--r--src/rpc/core_rpc_server.cpp8
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