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

Remove duplicate log #2860

Merged
merged 2 commits into from Mar 21, 2024
Merged
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
19 changes: 7 additions & 12 deletions snow/engine/snowman/bootstrap/bootstrapper.go
Expand Up @@ -307,16 +307,6 @@ func (b *Bootstrapper) sendBootstrappingMessagesOrFinish(ctx context.Context) er
return b.startBootstrapping(ctx)
}

if !b.restarted {
b.Ctx.Log.Info("bootstrapping started syncing",
zap.Int("numAccepted", numAccepted),
)
} else {
b.Ctx.Log.Debug("bootstrapping started syncing",
zap.Int("numAccepted", numAccepted),
)
}

return b.startSyncing(ctx, accepted)
}

Expand Down Expand Up @@ -392,9 +382,14 @@ func (b *Bootstrapper) startSyncing(ctx context.Context, acceptedContainerIDs []
// Append the list of accepted container IDs to pendingContainerIDs to ensure
// we iterate over every container that must be traversed.
pendingContainerIDs = append(pendingContainerIDs, acceptedContainerIDs...)
b.Ctx.Log.Debug("starting bootstrapping",
zap.Int("numPendingBlocks", len(pendingContainerIDs)),

log := b.Ctx.Log.Info
if b.restarted {
log = b.Ctx.Log.Debug
}
log("starting to fetch blocks",
zap.Int("numAcceptedBlocks", len(acceptedContainerIDs)),
zap.Int("numMissingBlocks", len(pendingContainerIDs)),
)

toProcess := make([]snowman.Block, 0, len(pendingContainerIDs))
Expand Down