38
38
#include < boost/interprocess/sync/file_lock.hpp>
39
39
#include < openssl/crypto.h>
40
40
41
- using namespace std ;
42
41
using namespace boost ;
42
+ using namespace std ;
43
43
44
44
#ifdef ENABLE_WALLET
45
45
CWallet* pwalletMain;
@@ -109,10 +109,11 @@ static CCoinsViewDB *pcoinsdbview;
109
109
110
110
void Shutdown ()
111
111
{
112
- LogPrintf (" Shutdown : In progress...\n " );
112
+ LogPrintf (" %s : In progress...\n " , __func__ );
113
113
static CCriticalSection cs_Shutdown;
114
114
TRY_LOCK (cs_Shutdown, lockShutdown);
115
- if (!lockShutdown) return ;
115
+ if (!lockShutdown)
116
+ return ;
116
117
117
118
RenameThread (" bitcoin-shutoff" );
118
119
mempool.AddTransactionsUpdated (1 );
@@ -130,7 +131,7 @@ void Shutdown()
130
131
if (est_fileout)
131
132
mempool.WriteFeeEstimates (est_fileout);
132
133
else
133
- LogPrintf (" failed to write fee estimates" );
134
+ LogPrintf (" %s: Failed to write fee estimates to %s \n " , __func__, est_path. string () );
134
135
135
136
{
136
137
LOCK (cs_main);
@@ -142,9 +143,12 @@ void Shutdown()
142
143
pblocktree->Flush ();
143
144
if (pcoinsTip)
144
145
pcoinsTip->Flush ();
145
- delete pcoinsTip; pcoinsTip = NULL ;
146
- delete pcoinsdbview; pcoinsdbview = NULL ;
147
- delete pblocktree; pblocktree = NULL ;
146
+ delete pcoinsTip;
147
+ pcoinsTip = NULL ;
148
+ delete pcoinsdbview;
149
+ pcoinsdbview = NULL ;
150
+ delete pblocktree;
151
+ pblocktree = NULL ;
148
152
}
149
153
#ifdef ENABLE_WALLET
150
154
if (pwalletMain)
@@ -156,7 +160,7 @@ void Shutdown()
156
160
if (pwalletMain)
157
161
delete pwalletMain;
158
162
#endif
159
- LogPrintf (" Shutdown : done\n " );
163
+ LogPrintf (" %s : done\n " , __func__ );
160
164
}
161
165
162
166
//
@@ -315,6 +319,7 @@ std::string HelpMessage(HelpMessageMode mode)
315
319
316
320
strUsage += " \n " + _ (" Node relay options:" ) + " \n " ;
317
321
strUsage += " -datacarrier " + _ (" Relay and mine data carrier transactions (default: 1)" ) + " \n " ;
322
+
318
323
strUsage += " \n " + _ (" Block creation options:" ) + " \n " ;
319
324
strUsage += " -blockminsize=<n> " + _ (" Set minimum block size in bytes (default: 0)" ) + " \n " ;
320
325
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)
564
569
if (GetBoolArg (" -nodebug" , false ) || find (categories.begin (), categories.end (), string (" 0" )) != categories.end ())
565
570
fDebug = false ;
566
571
567
- // Check for -debugnet (deprecated)
572
+ // Check for -debugnet
568
573
if (GetBoolArg (" -debugnet" , false ))
569
- InitWarning (_ (" Warning: Deprecated argument -debugnet ignored, use -debug=net" ));
574
+ InitWarning (_ (" Warning: Unsupported argument -debugnet ignored, use -debug=net. " ));
570
575
// Check for -socks - as this is a privacy risk to continue, exit here
571
576
if (mapArgs.count (" -socks" ))
572
577
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)
994
999
995
1000
boost::filesystem::path est_path = GetDataDir () / FEE_ESTIMATES_FILENAME;
996
1001
CAutoFile est_filein = CAutoFile (fopen (est_path.string ().c_str (), " rb" ), SER_DISK, CLIENT_VERSION);
1002
+ // Allowed to fail as this file IS missing on first startup.
997
1003
if (est_filein)
998
1004
mempool.ReadFeeEstimates (est_filein);
999
1005
0 commit comments