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

RpcDaemon doesn't see recently retired blocks #9318

Merged
merged 17 commits into from
Jan 29, 2024
Prev Previous commit
Next Next commit
save
  • Loading branch information
AskAlexSharov committed Jan 26, 2024
commit 23b56abf8ab213fdafdf5e051465e63c7e0ed1f4
8 changes: 6 additions & 2 deletions eth/integrity/snap_blocks_read.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/ledgerwatch/log/v3"
)

func SnapBlocksRead(db kv.RoDB, blockReader services.FullBlockReader, ctx context.Context) error {
func SnapBlocksRead(db kv.RoDB, blockReader services.FullBlockReader, ctx context.Context, failFast bool) error {
defer log.Info("[integrity] SnapBlocksRead: done")
logEvery := time.NewTicker(10 * time.Second)
defer logEvery.Stop()
Expand All @@ -23,7 +23,11 @@ func SnapBlocksRead(db kv.RoDB, blockReader services.FullBlockReader, ctx contex
return err
}
if b == nil {
return fmt.Errorf("block not found in snapshots: %d\n", i)
err := fmt.Errorf("block not found in snapshots: %d\n", i)
if failFast {
return err
}
log.Warn("[integrity] SnapBlocksRead", "err", err)
}
return nil
}); err != nil {
Expand Down
Loading