@@ -286,7 +286,8 @@ func (ccp *WasmChainProcessor) Run(ctx context.Context, initialBlockHistory uint
286
286
287
287
ccp .log .Debug ("Entering Wasm main query loop" )
288
288
if ccp .chainProvider .rangeSupport {
289
- inSyncNumBlocksThreshold = 15
289
+ numOffsetBlocks = 7
290
+ inSyncNumBlocksThreshold = 20
290
291
defaultQueryLoopTime := 7
291
292
if ccp .chainProvider .PCfg .BlockRPCRefreshTime > 0 {
292
293
defaultQueryLoopTime = ccp .chainProvider .PCfg .BlockRPCRefreshTime
@@ -489,6 +490,12 @@ func (ccp *WasmChainProcessor) queryCycle(ctx context.Context, persistence *quer
489
490
persistence .latestQueriedBlock = status .SyncInfo .LatestBlockHeight
490
491
return nil
491
492
}
493
+ if status .SyncInfo .CatchingUp {
494
+ ccp .log .Debug ("chain is still catching up" ,
495
+ zap .Int64 ("last_height" , persistence .latestQueriedBlock ),
496
+ zap .Int64 ("latest_height" , status .SyncInfo .LatestBlockHeight ))
497
+ return nil
498
+ }
492
499
if (persistence .latestQueriedBlock + 1 ) >= persistence .latestHeight {
493
500
return nil
494
501
}
@@ -516,8 +523,7 @@ func (ccp *WasmChainProcessor) queryCycle(ctx context.Context, persistence *quer
516
523
if ccp .shouldSkipProcessBlock (blocks , i ) {
517
524
newLatestQueriedBlock = i
518
525
ccp .log .Debug ("Skipping block" , zap .Any ("height" , i ),
519
- zap .Any ("last_height" , persistence .latestQueriedBlock ),
520
- zap .Any ("blocks" , blocks ))
526
+ zap .Any ("last_height" , persistence .latestQueriedBlock ))
521
527
continue
522
528
}
523
529
eg .Go (func () (err error ) {
0 commit comments