Skip to content

Commit

Permalink
Merge pull request #2182 from kcalvinalvin/2024-05-01-fix-logs
Browse files Browse the repository at this point in the history
blockchain, main: add and fix logs
  • Loading branch information
Roasbeef authored May 22, 2024
2 parents c4ed92f + d65999e commit b039ee6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit b039ee6

Please sign in to comment.