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

Function ProcessInitCommands

src/bitcoind.cpp:137–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137static bool ProcessInitCommands(interfaces::Init& init, ArgsManager& args)
138{
139 // Process help and version before taking care about datadir
140 if (HelpRequested(args) || args.GetBoolArg("-version", false)) {
141 std::string strUsage = CLIENT_NAME " daemon version " + FormatFullVersion();
142 if (const char* exe_name{init.exeName()}) {
143 strUsage += " ";
144 strUsage += exe_name;
145 }
146 strUsage += "\n";
147
148 if (args.GetBoolArg("-version", false)) {
149 strUsage += FormatParagraph(LicenseInfo());
150 } else {
151 strUsage += "\n"
152 "The " CLIENT_NAME " daemon (bitcoind) is a headless program that connects to the Bitcoin network to validate and relay transactions and blocks, as well as relaying addresses.\n\n"
153 "It provides the backbone of the Bitcoin network and its RPC, REST and ZMQ services can provide various transaction, block and address-related services.\n\n"
154 "There is an optional wallet component which provides transaction services.\n\n"
155 "It can be used in a headless environment or as part of a server setup.\n"
156 "\n"
157 "Usage: bitcoind [options]\n"
158 "\n";
159 strUsage += args.GetHelpMessage();
160 }
161
162 tfm::format(std::cout, "%s", strUsage);
163 return true;
164 }
165
166 return false;
167}
168
169static bool AppInit(NodeContext& node)
170{

Callers 1

bitcoind.cppFile · 0.85

Calls 8

HelpRequestedFunction · 0.85
FormatFullVersionFunction · 0.85
FormatParagraphFunction · 0.85
LicenseInfoFunction · 0.85
GetBoolArgMethod · 0.80
GetHelpMessageMethod · 0.80
formatFunction · 0.70
exeNameMethod · 0.45

Tested by

no test coverage detected