diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp index 76c5d0ed3e..dd1bd33437 100644 --- a/src/chainparamsbase.cpp +++ b/src/chainparamsbase.cpp @@ -17,7 +17,7 @@ void SetupChainParamsBaseOptions(ArgsManager& argsman) { - argsman.AddArg("-chain=", "Use the chain (default: liquidv1). Reserved values: main, test, signet, regtest, liquidv1, liquidv1test", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS); + argsman.AddArg("-chain=", "Use the chain (default: liquidv1). Reserved values: " LIST_CHAIN_NAMES, ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS); argsman.AddArg("-regtest", "Enter regression test mode, which uses a special chain in which blocks can be solved instantly. " "This is intended for regression testing tools and app development. Equivalent to -chain=regtest.", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS); argsman.AddArg("-testactivationheight=name@height.", "Set the activation height of 'name' (segwit, bip34, dersig, cltv, csv). (regtest-only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST); diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h index 7a8d07ac5f..254b1c5eb5 100644 --- a/src/chainparamsbase.h +++ b/src/chainparamsbase.h @@ -60,4 +60,7 @@ void SelectBaseParams(const ChainType chain); std::unique_ptr CreateBaseChainParams(const ChainTypeMeta chain); void SelectBaseParams(const ChainTypeMeta chain); +/** List of possible chain / network names */ +#define LIST_CHAIN_NAMES "main, test, signet, regtest, liquidv1, liquidv1test" + #endif // BITCOIN_CHAINPARAMSBASE_H diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 9e18d518ca..a48a4e11bd 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -1423,7 +1424,7 @@ RPCHelpMan getblockchaininfo() RPCResult{ RPCResult::Type::OBJ, "", "", { - {RPCResult::Type::STR, "chain", "current network name (main, test, testnet4, signet, regtest)"}, + {RPCResult::Type::STR, "chain", "current network name (" LIST_CHAIN_NAMES ")"}, {RPCResult::Type::NUM, "blocks", "the height of the most-work fully-validated chain. The genesis block has height 0"}, {RPCResult::Type::NUM, "headers", "the current number of headers we have validated"}, {RPCResult::Type::STR, "bestblockhash", "the hash of the currently best block"}, diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 554dbde95c..be2422267b 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -443,7 +444,7 @@ static RPCHelpMan getmininginfo() {RPCResult::Type::NUM, "difficulty", /*optional=*/true, "The current difficulty"}, {RPCResult::Type::NUM, "networkhashps", /*optional=*/true, "The network hashes per second"}, {RPCResult::Type::NUM, "pooledtx", "The size of the mempool"}, - {RPCResult::Type::STR, "chain", "current network name (main, test, testnet4, signet, regtest)"}, + {RPCResult::Type::STR, "chain", "current network name (" LIST_CHAIN_NAMES ")"}, (IsDeprecatedRPCEnabled("warnings") ? RPCResult{RPCResult::Type::STR, "warnings", "any network and blockchain warnings (DEPRECATED)"} : RPCResult{RPCResult::Type::ARR, "warnings", "any network and blockchain warnings (run with `-deprecatedrpc=warnings` to return the latest warning as a single string)",