Skip to content

Commit

Permalink
fix bad logs
Browse files Browse the repository at this point in the history
  • Loading branch information
blxdyx committed Aug 6, 2024
1 parent c3d434d commit 6346dcb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion eth/stagedsync/stage_bodies.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ func BodiesForward(

if cfg.chanConfig.Parlia != nil && cfg.chanConfig.IsCancun(headerNumber, header.Time) {
if err = core.IsDataAvailable(cr, header, rawBody, cfg.bd.LatestBlock); err != nil {
log.Error("Miss blobSidecars", "err", err)
return false, err
}
}
Expand Down
8 changes: 6 additions & 2 deletions turbo/stages/bodydownload/body_algos.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,12 @@ func (bd *BodyDownload) checkPrefetchedBlock(hash libcommon.Hash, tx kv.RwTx, bl

if header.BlobGasUsed != nil {
want := *header.BlobGasUsed / params.BlobTxBlobGasPerBlob
if want != uint64(len(body.Sidecars)) {
bd.logger.Debug("Prefetched Block Error", "Number", header.Number.Uint64(), "Hash", header.Hash(), "want", want, "actual", len(body.Sidecars))
actual := 0
for _, BlobSidecar := range body.Sidecars {
actual += len(BlobSidecar.Blobs)
}
if want != uint64(actual) {
bd.logger.Debug("Prefetched Block Error", "Number", header.Number.Uint64(), "Hash", header.Hash(), "want", want, "actual", actual)
return false
}
}
Expand Down

0 comments on commit 6346dcb

Please sign in to comment.