Skip to content

Commit

Permalink
log verification progress
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangchiqing committed Dec 20, 2024
1 parent a2ad9e6 commit deb3491
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions engine/verification/verifier/verifiers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/onflow/flow-go/module"
"github.com/onflow/flow-go/module/chunks"
"github.com/onflow/flow-go/module/metrics"
"github.com/onflow/flow-go/module/util"
"github.com/onflow/flow-go/state/protocol"
"github.com/onflow/flow-go/storage"
storagepebble "github.com/onflow/flow-go/storage/pebble"
Expand Down Expand Up @@ -125,6 +126,14 @@ func verifyConcurrently(
var lowestErrHeight uint64 = ^uint64(0) // Initialize to max value of uint64
var mu sync.Mutex // To protect access to lowestErr and lowestErrHeight

lg := util.LogProgress(
log.Logger,
util.DefaultLogProgressConfig(
fmt.Sprintf("verifying heights progress for [%v:%v]", from, to),
int(to+1-from),
),
)

// Worker function
worker := func() {
for {
Expand Down Expand Up @@ -154,6 +163,8 @@ func verifyConcurrently(
} else {
log.Info().Uint64("height", height).Msg("verified height successfully")
}

lg(1) // log progress
}
}
}
Expand Down

0 comments on commit deb3491

Please sign in to comment.