Changeset View
Changeset View
Standalone View
Standalone View
src/bitcoind.cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#if defined(HAVE_CONFIG_H) | #if defined(HAVE_CONFIG_H) | ||||
#include "config/bitcoin-config.h" | #include "config/bitcoin-config.h" | ||||
#endif | #endif | ||||
#include "chainparams.h" | #include "chainparams.h" | ||||
#include "clientversion.h" | #include "clientversion.h" | ||||
#include "compat.h" | #include "compat.h" | ||||
#include "config.h" | #include "config.h" | ||||
#include "fs.h" | |||||
#include "httprpc.h" | #include "httprpc.h" | ||||
#include "httpserver.h" | #include "httpserver.h" | ||||
#include "init.h" | #include "init.h" | ||||
#include "noui.h" | #include "noui.h" | ||||
#include "rpc/server.h" | #include "rpc/server.h" | ||||
#include "scheduler.h" | #include "scheduler.h" | ||||
#include "util.h" | #include "util.h" | ||||
#include "utilstrencodings.h" | #include "utilstrencodings.h" | ||||
#include <boost/algorithm/string/predicate.hpp> | #include <boost/algorithm/string/predicate.hpp> | ||||
#include <boost/filesystem.hpp> | |||||
#include <boost/thread.hpp> | #include <boost/thread.hpp> | ||||
#include <cstdio> | #include <cstdio> | ||||
/* Introduction text for doxygen: */ | /* Introduction text for doxygen: */ | ||||
/*! \mainpage Developer documentation | /*! \mainpage Developer documentation | ||||
* | * | ||||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | if (IsArgSet("-?") || IsArgSet("-h") || IsArgSet("-help") || | ||||
strUsage += "\n" + HelpMessage(HMM_BITCOIND); | strUsage += "\n" + HelpMessage(HMM_BITCOIND); | ||||
} | } | ||||
fprintf(stdout, "%s", strUsage.c_str()); | fprintf(stdout, "%s", strUsage.c_str()); | ||||
return true; | return true; | ||||
} | } | ||||
try { | try { | ||||
if (!boost::filesystem::is_directory(GetDataDir(false))) { | if (!fs::is_directory(GetDataDir(false))) { | ||||
fprintf(stderr, | fprintf(stderr, | ||||
"Error: Specified data directory \"%s\" does not exist.\n", | "Error: Specified data directory \"%s\" does not exist.\n", | ||||
GetArg("-datadir", "").c_str()); | GetArg("-datadir", "").c_str()); | ||||
return false; | return false; | ||||
} | } | ||||
try { | try { | ||||
ReadConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME)); | ReadConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME)); | ||||
} catch (const std::exception &e) { | } catch (const std::exception &e) { | ||||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |