Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blockchain, main: add and fix logs #2182

Merged
merged 2 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion blockchain/utxocache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
5 changes: 5 additions & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down