aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-07-09 16:49:21 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-07-09 16:50:58 +0200
commite28c1ae75d47738d9ee1a91335432100c8e0f03d (patch)
treec0f0b43b505b3c99e56b5999fa5948042853b35e /src
parent4856f4c396d311b74f133b9e2b8e822c99bbe8e2 (diff)
parent00d1980b8fb8b834cb729b213834dfb38cb01bbf (diff)
downloadbitcoin-e28c1ae75d47738d9ee1a91335432100c8e0f03d.tar.xz
Merge pull request #4428
00d1980 init.cpp: log fee estimates filename on error (Philip Kaufmann)
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/init.cpp b/src/init.cpp
index f9e568a207..a1d75c9674 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -38,8 +38,8 @@
#include <boost/interprocess/sync/file_lock.hpp>
#include <openssl/crypto.h>
-using namespace std;
using namespace boost;
+using namespace std;
#ifdef ENABLE_WALLET
CWallet* pwalletMain;
@@ -109,10 +109,11 @@ static CCoinsViewDB *pcoinsdbview;
void Shutdown()
{
- LogPrintf("Shutdown : In progress...\n");
+ LogPrintf("%s: In progress...\n", __func__);
static CCriticalSection cs_Shutdown;
TRY_LOCK(cs_Shutdown, lockShutdown);
- if (!lockShutdown) return;
+ if (!lockShutdown)
+ return;
RenameThread("bitcoin-shutoff");
mempool.AddTransactionsUpdated(1);
@@ -130,7 +131,7 @@ void Shutdown()
if (est_fileout)
mempool.WriteFeeEstimates(est_fileout);
else
- LogPrintf("failed to write fee estimates");
+ LogPrintf("%s: Failed to write fee estimates to %s\n", __func__, est_path.string());
{
LOCK(cs_main);
@@ -142,9 +143,12 @@ void Shutdown()
pblocktree->Flush();
if (pcoinsTip)
pcoinsTip->Flush();
- delete pcoinsTip; pcoinsTip = NULL;
- delete pcoinsdbview; pcoinsdbview = NULL;
- delete pblocktree; pblocktree = NULL;
+ delete pcoinsTip;
+ pcoinsTip = NULL;
+ delete pcoinsdbview;
+ pcoinsdbview = NULL;
+ delete pblocktree;
+ pblocktree = NULL;
}
#ifdef ENABLE_WALLET
if (pwalletMain)
@@ -156,7 +160,7 @@ void Shutdown()
if (pwalletMain)
delete pwalletMain;
#endif
- LogPrintf("Shutdown : done\n");
+ LogPrintf("%s: done\n", __func__);
}
//
@@ -315,6 +319,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += "\n" + _("Node relay options:") + "\n";
strUsage += " -datacarrier " + _("Relay and mine data carrier transactions (default: 1)") + "\n";
+
strUsage += "\n" + _("Block creation options:") + "\n";
strUsage += " -blockminsize=<n> " + _("Set minimum block size in bytes (default: 0)") + "\n";
strUsage += " -blockmaxsize=<n> " + strprintf(_("Set maximum block size in bytes (default: %d)"), DEFAULT_BLOCK_MAX_SIZE) + "\n";
@@ -564,9 +569,9 @@ bool AppInit2(boost::thread_group& threadGroup)
if (GetBoolArg("-nodebug", false) || find(categories.begin(), categories.end(), string("0")) != categories.end())
fDebug = false;
- // Check for -debugnet (deprecated)
+ // Check for -debugnet
if (GetBoolArg("-debugnet", false))
- InitWarning(_("Warning: Deprecated argument -debugnet ignored, use -debug=net"));
+ InitWarning(_("Warning: Unsupported argument -debugnet ignored, use -debug=net."));
// Check for -socks - as this is a privacy risk to continue, exit here
if (mapArgs.count("-socks"))
return InitError(_("Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported."));
@@ -994,6 +999,7 @@ bool AppInit2(boost::thread_group& threadGroup)
boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
CAutoFile est_filein = CAutoFile(fopen(est_path.string().c_str(), "rb"), SER_DISK, CLIENT_VERSION);
+ // Allowed to fail as this file IS missing on first startup.
if (est_filein)
mempool.ReadFeeEstimates(est_filein);