diff --git a/docs/COMMAND_LINE.MD b/docs/COMMAND_LINE.MD index f8ea921..4f2104c 100644 --- a/docs/COMMAND_LINE.MD +++ b/docs/COMMAND_LINE.MD @@ -11,7 +11,8 @@ --light-mode Don't allocate RandomX dataset, saves 2GB of RAM --loglevel Verbosity of the log, integer number between 0 and 6 --data-dir Path to store general p2pool files (log, cache, peer data, etc.), default is current directory ---config Name of p2pool sidechain's config file (don't use it unless you want to mine to a different p2pool chain) +--config Deprecated, will be removed in the next version. Use --sidechain-config instead +--sidechain-config Name of the p2pool sidechain parameters file (only use it if you run your own sidechain) --data-api Path to the p2pool JSON data (use it in tandem with an external web-server). Not affected by --data-dir setting! --local-api Enable /local/ path in api path for Stratum Server and built-in miner statistics --stratum-api An alias for --local-api diff --git a/config.json b/sidechain_config.json similarity index 100% rename from config.json rename to sidechain_config.json diff --git a/src/main.cpp b/src/main.cpp index 0953fb5..c2e82dd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -49,7 +49,8 @@ void p2pool_usage() "--light-mode Don't allocate RandomX dataset, saves 2GB of RAM\n" "--loglevel Verbosity of the log, integer number between 0 and %d\n" "--data-dir Path to store general p2pool files (log, cache, peer data, etc.), default is current directory\n" - "--config Name of the p2pool config file\n" + "--config Deprecated, will be removed in the next version. Use --sidechain-config instead\n" + "--sidechain-config Name of the p2pool sidechain parameters file (only use it if you run your own sidechain)\n" "--data-api Path to the p2pool JSON data (use it in tandem with an external web-server). Not affected by --data-dir setting!\n" "--local-api Enable /local/ path in api path for Stratum Server and built-in miner statistics\n" "--stratum-api An alias for --local-api\n" diff --git a/src/params.cpp b/src/params.cpp index 12e2746..c6b6791 100644 --- a/src/params.cpp +++ b/src/params.cpp @@ -102,7 +102,13 @@ Params::Params(int argc, char* const argv[]) } if ((strcmp(argv[i], "--config") == 0) && (i + 1 < argc)) { - m_config = argv[++i]; + LOGWARN(0, "--config command line parameter is deprecated and will be removed in the next version. Use --sidechain-config instead"); + m_sidechainConfig = argv[++i]; + ok = true; + } + + if ((strcmp(argv[i], "--sidechain-config") == 0) && (i + 1 < argc)) { + m_sidechainConfig = argv[++i]; ok = true; } diff --git a/src/params.h b/src/params.h index 93bc851..2d8c6a7 100644 --- a/src/params.h +++ b/src/params.h @@ -68,7 +68,7 @@ struct Params std::string m_stratumAddresses; std::string m_p2pAddresses; std::string m_p2pPeerList; - std::string m_config; + std::string m_sidechainConfig; std::string m_apiPath; bool m_localStats = false; bool m_blockCache = true; diff --git a/src/side_chain.cpp b/src/side_chain.cpp index 57b6c7b..5b16d75 100644 --- a/src/side_chain.cpp +++ b/src/side_chain.cpp @@ -84,7 +84,7 @@ SideChain::SideChain(p2pool* pool, NetworkType type, const char* pool_name) LOGINFO(1, log::LightCyan() << "network type = " << type); - if (m_pool && !load_config(m_pool->params().m_config)) { + if (m_pool && !load_config(m_pool->params().m_sidechainConfig)) { PANIC_STOP(); }