aboutsummaryrefslogtreecommitdiff
path: root/src/p2p
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-02-02 22:41:28 +0200
committerRiccardo Spagni <ric@spagni.net>2017-02-02 22:41:28 +0200
commitfcb299b4aedf1b4f465c36f2114290a0a5f3f062 (patch)
treea206fd1c33ab4e71aa4af8eb5bec43735cfbaeb1 /src/p2p
parentMerge pull request #1656 (diff)
parentSeparate data per P2P port (diff)
downloadmonero-fcb299b4aedf1b4f465c36f2114290a0a5f3f062.tar.xz
Merge pull request #1641
ca94d0a4 Separate data per P2P port (Miguel Herranz)
Diffstat (limited to 'src/p2p')
-rw-r--r--src/p2p/net_node.inl5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index d67c5dd93..7ab6a4894 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -505,6 +505,11 @@ namespace nodetool
auto config_arg = testnet ? command_line::arg_testnet_data_dir : command_line::arg_data_dir;
m_config_folder = command_line::get_arg(vm, config_arg);
+ if ((!testnet && m_port != std::to_string(::config::P2P_DEFAULT_PORT))
+ || (testnet && m_port != std::to_string(::config::testnet::P2P_DEFAULT_PORT))) {
+ m_config_folder = m_config_folder + "/" + m_port;
+ }
+
res = init_config();
CHECK_AND_ASSERT_MES(res, false, "Failed to init config.");