@@ -284,7 +284,7 @@ void Shutdown(NodeContext& node)
284
284
static Mutex g_shutdown_mutex;
285
285
TRY_LOCK (g_shutdown_mutex, lock_shutdown);
286
286
if (!lock_shutdown) return ;
287
- LogPrintf ( " %s: In progress...\n " , __func__ );
287
+ LogInfo ( " Shutdown in progress..." );
288
288
Assert (node.args );
289
289
290
290
// / Note: Shutdown() must be able to handle cases in which initialization failed part of the way,
@@ -395,7 +395,7 @@ void Shutdown(NodeContext& node)
395
395
396
396
RemovePidFile (*node.args );
397
397
398
- LogPrintf ( " %s: done\n " , __func__ );
398
+ LogInfo ( " Shutdown done" );
399
399
}
400
400
401
401
/* *
@@ -898,7 +898,7 @@ bool AppInitParameterInteraction(const ArgsManager& args)
898
898
// on the command line or in this chain's section of the config file.
899
899
ChainType chain = args.GetChainType ();
900
900
if (chain == ChainType::SIGNET) {
901
- LogPrintf (" Signet derived magic (message start): %s\n " , HexStr (chainparams.MessageStart ()));
901
+ LogInfo (" Signet derived magic (message start): %s" , HexStr (chainparams.MessageStart ()));
902
902
}
903
903
bilingual_str errors;
904
904
for (const auto & arg : args.GetUnsuitableSectionOnlyArgs ()) {
@@ -1234,7 +1234,9 @@ static ChainstateLoadResult InitAndLoadChainstate(
1234
1234
if (!mempool_error.empty ()) {
1235
1235
return {ChainstateLoadStatus::FAILURE_FATAL, mempool_error};
1236
1236
}
1237
- LogPrintf (" * Using %.1f MiB for in-memory UTXO set (plus up to %.1f MiB of unused mempool space)\n " , cache_sizes.coins * (1.0 / 1024 / 1024 ), mempool_opts.max_size_bytes * (1.0 / 1024 / 1024 ));
1237
+ LogInfo (" * Using %.1f MiB for in-memory UTXO set (plus up to %.1f MiB of unused mempool space)" ,
1238
+ cache_sizes.coins * (1.0 / 1024 / 1024 ),
1239
+ mempool_opts.max_size_bytes * (1.0 / 1024 / 1024 ));
1238
1240
ChainstateManager::Options chainman_opts{
1239
1241
.chainparams = chainparams,
1240
1242
.datadir = args.GetDataDirNet (),
@@ -1274,10 +1276,10 @@ static ChainstateLoadResult InitAndLoadChainstate(
1274
1276
// libbitcoinkernel.
1275
1277
chainman.snapshot_download_completed = [&node]() {
1276
1278
if (!node.chainman ->m_blockman .IsPruneMode ()) {
1277
- LogPrintf (" [snapshot] re-enabling NODE_NETWORK services\n " );
1279
+ LogInfo (" [snapshot] re-enabling NODE_NETWORK services" );
1278
1280
node.connman ->AddLocalServices (NODE_NETWORK);
1279
1281
}
1280
- LogPrintf (" [snapshot] restarting indexes\n " );
1282
+ LogInfo (" [snapshot] restarting indexes" );
1281
1283
// Drain the validation interface queue to ensure that the old indexes
1282
1284
// don't have any pending work.
1283
1285
Assert (node.validation_signals )->SyncWithValidationInterfaceQueue ();
@@ -1345,7 +1347,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
1345
1347
return false ;
1346
1348
}
1347
1349
1348
- LogPrintf (" Using at most %i automatic connections (%i file descriptors available)\n " , nMaxConnections, available_fds);
1350
+ LogInfo (" Using at most %i automatic connections (%i file descriptors available)" , nMaxConnections, available_fds);
1349
1351
1350
1352
// Warn about relative -datadir path.
1351
1353
if (args.IsArgSet (" -datadir" ) && !args.GetPathArg (" -datadir" ).is_absolute ()) {
@@ -1402,7 +1404,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
1402
1404
} catch (const std::exception& e) {
1403
1405
return InitError (Untranslated (strprintf (" Unable to bind to IPC address '%s'. %s" , address, e.what ())));
1404
1406
}
1405
- LogPrintf (" Listening for IPC requests on address %s\n " , address);
1407
+ LogInfo (" Listening for IPC requests on address %s" , address);
1406
1408
}
1407
1409
}
1408
1410
@@ -1495,9 +1497,9 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
1495
1497
return false ;
1496
1498
}
1497
1499
const uint256 asmap_version = (HashWriter{} << asmap).GetHash ();
1498
- LogPrintf (" Using asmap version %s for IP bucketing\n " , asmap_version.ToString ());
1500
+ LogInfo (" Using asmap version %s for IP bucketing" , asmap_version.ToString ());
1499
1501
} else {
1500
- LogPrintf (" Using /16 prefix for IP bucketing\n " );
1502
+ LogInfo (" Using /16 prefix for IP bucketing" );
1501
1503
}
1502
1504
1503
1505
// Initialize netgroup manager
@@ -1753,7 +1755,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
1753
1755
// As LoadBlockIndex can take several minutes, it's possible the user
1754
1756
// requested to kill the GUI during the last operation. If so, exit.
1755
1757
if (ShutdownRequested (node)) {
1756
- LogPrintf (" Shutdown requested. Exiting.\n " );
1758
+ LogInfo (" Shutdown requested. Exiting." );
1757
1759
return false ;
1758
1760
}
1759
1761
@@ -1808,10 +1810,10 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
1808
1810
} else {
1809
1811
// Prior to setting NODE_NETWORK, check if we can provide historical blocks.
1810
1812
if (!WITH_LOCK (chainman.GetMutex (), return chainman.BackgroundSyncInProgress ())) {
1811
- LogPrintf (" Setting NODE_NETWORK on non-prune mode\n " );
1813
+ LogInfo (" Setting NODE_NETWORK on non-prune mode" );
1812
1814
g_local_services = ServiceFlags (g_local_services | NODE_NETWORK);
1813
1815
} else {
1814
- LogPrintf (" Running node in NODE_NETWORK_LIMITED mode until snapshot background sync completes\n " );
1816
+ LogInfo (" Running node in NODE_NETWORK_LIMITED mode until snapshot background sync completes" );
1815
1817
}
1816
1818
}
1817
1819
@@ -1870,7 +1872,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
1870
1872
// Import blocks and ActivateBestChain()
1871
1873
ImportBlocks (chainman, vImportFiles);
1872
1874
if (args.GetBoolArg (" -stopafterblockimport" , DEFAULT_STOPAFTERBLOCKIMPORT)) {
1873
- LogPrintf (" Stopping after block import\n " );
1875
+ LogInfo (" Stopping after block import" );
1874
1876
if (!(Assert (node.shutdown_request ))()) {
1875
1877
LogError (" Failed to send shutdown signal after finishing block import\n " );
1876
1878
}
@@ -1918,7 +1920,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
1918
1920
{
1919
1921
LOCK (chainman.GetMutex ());
1920
1922
const auto & tip{*Assert (chainman.ActiveTip ())};
1921
- LogPrintf (" block tree size = %u\n " , chainman.BlockIndex ().size ());
1923
+ LogInfo (" block tree size = %u" , chainman.BlockIndex ().size ());
1922
1924
chain_active_height = tip.nHeight ;
1923
1925
best_block_time = tip.GetBlockTime ();
1924
1926
if (tip_info) {
@@ -1931,7 +1933,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
1931
1933
tip_info->header_time = chainman.m_best_header ->GetBlockTime ();
1932
1934
}
1933
1935
}
1934
- LogPrintf (" nBestHeight = %d\n " , chain_active_height);
1936
+ LogInfo (" nBestHeight = %d" , chain_active_height);
1935
1937
if (node.peerman ) node.peerman ->SetBestBlock (chain_active_height, std::chrono::seconds{best_block_time});
1936
1938
1937
1939
// Map ports with NAT-PMP
@@ -2061,11 +2063,11 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
2061
2063
connOptions.m_specified_outgoing = connect;
2062
2064
}
2063
2065
if (!connOptions.m_specified_outgoing .empty () && !connOptions.vSeedNodes .empty ()) {
2064
- LogPrintf (" -seednode is ignored when -connect is used\n " );
2066
+ LogInfo (" -seednode is ignored when -connect is used" );
2065
2067
}
2066
2068
2067
2069
if (args.IsArgSet (" -dnsseed" ) && args.GetBoolArg (" -dnsseed" , DEFAULT_DNSSEED) && args.IsArgSet (" -proxy" )) {
2068
- LogPrintf (" -dnsseed is ignored when -connect is used and -proxy is specified\n " );
2070
+ LogInfo (" -dnsseed is ignored when -connect is used and -proxy is specified" );
2069
2071
}
2070
2072
}
2071
2073
0 commit comments