Merge pull request #2182 from kcalvinalvin/2024-05-01-fix-logs

blockchain, main: add and fix logs
This commit is contained in:
Olaoluwa Osuntokun 2024-05-22 11:35:21 -07:00 committed by GitHub
commit b039ee6e56
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -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)

View file

@ -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{