fix: bootstrap queue size check

This commit is contained in:
Mohamed Sohail 2024-08-05 16:45:14 +08:00
parent fe01fd1f72
commit 886f90d044
Signed by: kamikazechaser
GPG Key ID: 7DD45520C01CD85D

View File

@ -32,6 +32,7 @@ const verifierInterval = 20 * time.Second
func New(o BackfillerOpts) *backfiller {
return &backfiller{
maxQueueSize: o.MaxQueueSize,
db: o.DB,
logg: o.Logg,
queue: o.Queue,
@ -87,7 +88,7 @@ func (b *backfiller) Run(skipLatest bool) error {
if missingBlocksCount > 0 {
if missingBlocksCount >= uint(b.maxQueueSize) {
b.logg.Warn("large number of blocks missing this may result in degraded RPC performance set FORCE_BACKFILL=* to continue", "missing_blocks", missingBlocksCount)
b.logg.Warn("large number of blocks missing this may result in degraded RPC performance set FORCE_BACKFILL=* to continue", "missing_blocks", missingBlocksCount, "max_queue_size", b.maxQueueSize)
_, ok := os.LookupEnv("FORCE_BACKFILL")
if !ok {
os.Exit(0)