From 689ac6b6de176fa153b3f7579a1d1a23e3b5c668 Mon Sep 17 00:00:00 2001 From: Calvin Kim Date: Wed, 1 May 2024 17:58:42 +0900 Subject: [PATCH 1/2] blockchain: remove trailing ":" and space on utxocache log --- blockchain/utxocache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockchain/utxocache.go b/blockchain/utxocache.go index 1902ade679..550d8c5602 100644 --- a/blockchain/utxocache.go +++ b/blockchain/utxocache.go @@ -234,7 +234,7 @@ func newUtxoCache(db database.DB, maxTotalMemoryUsage uint64) *utxoCache { numMaxElements := calculateMinEntries(int(maxTotalMemoryUsage), bucketSize+avgEntrySize) numMaxElements -= 1 - log.Infof("Pre-alloacting for %d MiB: ", maxTotalMemoryUsage/(1024*1024)+1) + log.Infof("Pre-alloacting for %d MiB", maxTotalMemoryUsage/(1024*1024)+1) m := make(map[wire.OutPoint]*UtxoEntry, numMaxElements) From d65999e4a18171bde2be9c015ba68ed3e9c175d9 Mon Sep 17 00:00:00 2001 From: Calvin Kim Date: Wed, 1 May 2024 17:59:18 +0900 Subject: [PATCH 2/2] main: add logging if the node is pruned For debug purposes down the road, log that the node is pruned if it's set to pruned. --- server.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server.go b/server.go index 0aa84d1f9c..9fca2db20c 100644 --- a/server.go +++ b/server.go @@ -2823,6 +2823,11 @@ func newServer(listenAddrs, agentBlacklist, agentWhitelist []string, checkpoints = mergeCheckpoints(s.chainParams.Checkpoints, cfg.addCheckpoints) } + // Log that the node is pruned. + if cfg.Prune != 0 { + btcdLog.Infof("Prune set to %d MiB", cfg.Prune) + } + // Create a new block chain instance with the appropriate configuration. var err error s.chain, err = blockchain.New(&blockchain.Config{