MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / ChainTypeToString

Function ChainTypeToString

src/util/chaintype.cpp:12–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#include <string>
11
12std::string ChainTypeToString(ChainType chain)
13{
14 switch (chain) {
15 case ChainType::MAIN:
16 return "main";
17 case ChainType::TESTNET:
18 return "test";
19 case ChainType::TESTNET4:
20 return "testnet4";
21 case ChainType::SIGNET:
22 return "signet";
23 case ChainType::REGTEST:
24 return "regtest";
25 }
26 assert(false);
27}
28
29std::optional<ChainType> ChainTypeFromString(std::string_view chain)
30{

Callers 15

SelectBaseParamsFunction · 0.85
BOOST_FIXTURE_TEST_CASEFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
ForEachMergeSetupMethod · 0.85
instantiateMethod · 0.85
StartupShortcutPathFunction · 0.85
GetAutostartFilePathFunction · 0.85
SetStartOnSystemStartupFunction · 0.85
GetChainTypeStringMethod · 0.85

Calls

no outgoing calls

Tested by 3

BOOST_FIXTURE_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
ForEachMergeSetupMethod · 0.68