Skip to content

Commit

Permalink
adds block height for sealed chunks logging
Browse files Browse the repository at this point in the history
  • Loading branch information
yhassanzadeh13 committed Jun 17, 2021
1 parent 6d91f65 commit 1f4f0b1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions engine/verification/fetcher/engine.go
Expand Up @@ -486,19 +486,26 @@ func (e Engine) validateStakedExecutionNodeAtBlockID(senderID flow.Identifier, b
// When the requester calls this callback method, it will never returns a chunk data pack for this chunk ID to the handler (i.e.,
// through HandleChunkDataPack).
func (e *Engine) NotifyChunkDataPackSealed(chunkID flow.Identifier) {
lg := e.log.With().
Hex("chunk_id", logging.ID(chunkID)).
Logger()
// we need to report that the job has been finished eventually
status, exists := e.pendingChunks.ByID(chunkID)
if !exists {
e.log.Debug().
Hex("chunk_id", logging.ID(chunkID)).
lg.Debug().
Msg("could not fetch pending status for sealed chunk from mempool, dropping chunk data")
return
}

lg = lg.With().
Uint64("block_height", status.BlockHeight).
Hex("result_id", logging.ID(status.ExecutionResult.ID())).Logger()
removed := e.pendingChunks.Rem(chunkID)

e.chunkConsumerNotifier.Notify(status.ChunkLocatorID())
e.log.Info().Bool("removed", removed).Msg("discards fetching chunk of an already sealed block and notified consumer")
lg.Info().
Bool("removed", removed).
Msg("discards fetching chunk of an already sealed block and notified consumer")
}

// pushToVerifierWithTracing encapsulates the logic of pushing a verifiable chunk to verifier engine with tracing enabled.
Expand Down

0 comments on commit 1f4f0b1

Please sign in to comment.