aboutsummaryrefslogtreecommitdiff
path: root/src/daemon
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-12-04 17:33:18 +0200
committerRiccardo Spagni <ric@spagni.net>2018-12-04 17:33:19 +0200
commit81418cb281c44481fc4137257df8e39623d94885 (patch)
tree1e1ac74513bb5128de98949eb4a15bfb61997c53 /src/daemon
parentMerge pull request #4892 (diff)
parentwallet_rpc_server: do not use RPC data if the call failed (diff)
downloadmonero-81418cb281c44481fc4137257df8e39623d94885.tar.xz
Merge pull request #4894
aee7a4e3 wallet_rpc_server: do not use RPC data if the call failed (moneromooo-monero) 1a0733e5 windows_service: fix memory leak (moneromooo-monero) 0dac3c64 unit_tests: do not rethrow a copy of an exception (moneromooo-monero) 5d9915ab cryptonote: fix get_unit for non default settings (moneromooo-monero) d4f50cb1 remove some unused code (moneromooo-monero) 61163971 a few minor (but easy) performance tweaks (moneromooo-monero) 30023074 tests: slow_memmem now returns size_t (moneromooo-monero)
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/core.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/daemon/core.h b/src/daemon/core.h
index d1defd573..c15d8d236 100644
--- a/src/daemon/core.h
+++ b/src/daemon/core.h
@@ -67,31 +67,16 @@ public:
m_core.set_cryptonote_protocol(&protocol);
}
- std::string get_config_subdir() const
- {
- bool testnet = command_line::get_arg(m_vm_HACK, cryptonote::arg_testnet_on);
- bool stagenet = command_line::get_arg(m_vm_HACK, cryptonote::arg_stagenet_on);
- bool mainnet = !testnet && !stagenet;
- std::string port = command_line::get_arg(m_vm_HACK, nodetool::arg_p2p_bind_port);
- if ((mainnet && port != std::to_string(::config::P2P_DEFAULT_PORT))
- || (testnet && port != std::to_string(::config::testnet::P2P_DEFAULT_PORT))
- || (stagenet && port != std::to_string(::config::stagenet::P2P_DEFAULT_PORT))) {
- return port;
- }
- return std::string();
- }
-
bool run()
{
//initialize core here
MGINFO("Initializing core...");
- std::string config_subdir = get_config_subdir();
#if defined(PER_BLOCK_CHECKPOINT)
const cryptonote::GetCheckpointsCallback& get_checkpoints = blocks::GetCheckpointsData;
#else
const cryptonote::GetCheckpointsCallback& get_checkpoints = nullptr;
#endif
- if (!m_core.init(m_vm_HACK, config_subdir.empty() ? NULL : config_subdir.c_str(), nullptr, get_checkpoints))
+ if (!m_core.init(m_vm_HACK, nullptr, get_checkpoints))
{
return false;
}