MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / main

Function main

src/bitcoin-cli.cpp:319–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317}
318
319int main(int argc, char* argv[])
320{
321 SetupEnvironment();
322 if (!SetupNetworking()) {
323 fprintf(stderr, "Error: Initializing networking failed\n");
324 exit(1);
325 }
326
327 try {
328 if(!AppInitRPC(argc, argv))
329 return EXIT_FAILURE;
330 }
331 catch (const std::exception& e) {
332 PrintExceptionContinue(&e, "AppInitRPC()");
333 return EXIT_FAILURE;
334 } catch (...) {
335 PrintExceptionContinue(NULL, "AppInitRPC()");
336 return EXIT_FAILURE;
337 }
338
339 int ret = EXIT_FAILURE;
340 try {
341 ret = CommandLineRPC(argc, argv);
342 }
343 catch (const std::exception& e) {
344 PrintExceptionContinue(&e, "CommandLineRPC()");
345 } catch (...) {
346 PrintExceptionContinue(NULL, "CommandLineRPC()");
347 }
348 return ret;
349}

Callers

nothing calls this directly

Calls 5

SetupEnvironmentFunction · 0.85
SetupNetworkingFunction · 0.85
AppInitRPCFunction · 0.85
PrintExceptionContinueFunction · 0.85
CommandLineRPCFunction · 0.85

Tested by

no test coverage detected