chore: add an error field to "Finished building block" (#14696)

* fix: print "Finished building block" only when succeeded

* Add failed log

* Apply preston's review
This commit is contained in:
Jun Song
2024-12-13 02:07:34 +09:00
committed by GitHub
parent ac1717f1e4
commit 1d8ffadd4f
2 changed files with 2 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve
- Added a Prometheus error counter metric for SSE requests.
- Save light client updates and bootstraps in DB.
- Added more comprehensive tests for `BlockToLightClientHeader`. [PR](https://github.com/prysmaticlabs/prysm/pull/14699)
- Added an error field to log `Finished building block`.
### Changed

View File

@@ -103,6 +103,7 @@ func (vs *Server) GetBeaconBlock(ctx context.Context, req *ethpb.BlockRequest) (
"slot": req.Slot,
"sinceSlotStartTime": time.Since(t),
"validator": sBlk.Block().ProposerIndex(),
"err": err,
}).Info("Finished building block")
if err != nil {
return nil, errors.Wrap(err, "could not build block in parallel")