aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/cryptonote_core.cpp
diff options
context:
space:
mode:
authorJeetraj <jeetrajsinh2005@gmail.com>2026-04-09 11:05:47 +0530
committerJeetraj <jeetrajsinh2005@gmail.com>2026-04-10 22:45:53 +0530
commit1d2ae2138a85dd93bc8a0d2c55513c5b5ba4658f (patch)
treec40703177d76ebd1f380607472e229250c3f2e2d /src/cryptonote_core/cryptonote_core.cpp
parentee1bbe766317b2197510d038753be62f09c13c00 (diff)
downloadmonzero-core-1d2ae2138a85dd93bc8a0d2c55513c5b5ba4658f.tar.gz
monzero-core-1d2ae2138a85dd93bc8a0d2c55513c5b5ba4658f.tar.xz
monzero-core-1d2ae2138a85dd93bc8a0d2c55513c5b5ba4658f.zip
p2p: isolate regtest from mainnet bootstrap state
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
-rw-r--r--src/cryptonote_core/cryptonote_core.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp
index 627f11450..4bada999f 100644
--- a/src/cryptonote_core/cryptonote_core.cpp
+++ b/src/cryptonote_core/cryptonote_core.cpp
@@ -97,16 +97,18 @@ namespace cryptonote
, "Fixed difficulty used for testing."
, 0
};
- const command_line::arg_descriptor<std::string, false, true, 2> arg_data_dir = {
+ const command_line::arg_descriptor<std::string, false, true, 3> arg_data_dir = {
"data-dir"
, "Specify data directory"
, tools::get_default_data_dir()
- , {{ &arg_testnet_on, &arg_stagenet_on }}
- , [](std::array<bool, 2> testnet_stagenet, bool defaulted, std::string val)->std::string {
- if (testnet_stagenet[0])
+ , {{ &arg_testnet_on, &arg_stagenet_on, &arg_regtest_on }}
+ , [](std::array<bool, 3> nets, bool defaulted, std::string val)->std::string {
+ if (nets[0])
return (boost::filesystem::path(val) / "testnet").string();
- else if (testnet_stagenet[1])
+ else if (nets[1])
return (boost::filesystem::path(val) / "stagenet").string();
+ else if (nets[2])
+ return (boost::filesystem::path(val) / "fake").string();
return val;
}
};
@@ -474,8 +476,6 @@ namespace cryptonote
bool keep_fakechain = command_line::get_arg(vm, arg_keep_fakechain);
boost::filesystem::path folder(m_config_folder);
- if (m_nettype == FAKECHAIN)
- folder /= "fake";
// make sure the data directory exists, and try to lock it
CHECK_AND_ASSERT_MES (boost::filesystem::exists(folder) || boost::filesystem::create_directories(folder), false,