diff options
author | doy-lee <doylet@protonmail.com> | 2018-11-16 15:32:05 +1100 |
---|---|---|
committer | doy-lee <doylet@protonmail.com> | 2018-11-16 15:32:05 +1100 |
commit | 6f2497bc7ac1865329527947afd6dacb0b1b6a06 (patch) | |
tree | 605f1a27ccba2d2ef738df809bbe4284f0246c27 /src/daemon/daemon.cpp | |
parent | Merge pull request #4842 (diff) | |
download | monero-6f2497bc7ac1865329527947afd6dacb0b1b6a06.tar.xz |
Don't cache nettype in core_rpc_server use m_core
This can go out of sync with m_core's nettype if you run in fakechain
mode since entering fakechain mode is done through code not the command
line and core_rpc_server only looks at the command line to figure out
the nettype.
Diffstat (limited to '')
-rw-r--r-- | src/daemon/daemon.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp index 49d6d49cf..13478f39d 100644 --- a/src/daemon/daemon.cpp +++ b/src/daemon/daemon.cpp @@ -75,18 +75,15 @@ public: protocol.set_p2p_endpoint(p2p.get()); core.set_protocol(protocol.get()); - const auto testnet = command_line::get_arg(vm, cryptonote::arg_testnet_on); - const auto stagenet = command_line::get_arg(vm, cryptonote::arg_stagenet_on); - const auto regtest = command_line::get_arg(vm, cryptonote::arg_regtest_on); 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, testnet ? cryptonote::TESTNET : stagenet ? cryptonote::STAGENET : regtest ? cryptonote::FAKECHAIN : cryptonote::MAINNET, main_rpc_port, "core"}); + rpcs.emplace_back(new t_rpc{vm, core, p2p, restricted, main_rpc_port, "core"}); 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)) { auto restricted_rpc_port = command_line::get_arg(vm, restricted_rpc_port_arg); - rpcs.emplace_back(new t_rpc{vm, core, p2p, true, testnet ? cryptonote::TESTNET : stagenet ? cryptonote::STAGENET : cryptonote::MAINNET, restricted_rpc_port, "restricted"}); + rpcs.emplace_back(new t_rpc{vm, core, p2p, true, restricted_rpc_port, "restricted"}); } } }; |