Skip to content

Commit 24949d4

Browse files
committed
fix: reset lastqueried block if provider returns smaller value
1 parent d180ade commit 24949d4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

relayer/chains/wasm/wasm_chain_processor.go

+7
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,13 @@ func (ccp *WasmChainProcessor) queryCycle(ctx context.Context, persistence *quer
482482
zap.Int64("delta", delta))
483483
persistence.latestHeight = status.SyncInfo.LatestBlockHeight
484484
heighttoSync = syncUpHeight()
485+
if persistence.latestQueriedBlock > status.SyncInfo.LatestBlockHeight {
486+
ccp.log.Debug("resetting range block",
487+
zap.Int64("last_height", persistence.latestQueriedBlock),
488+
zap.Int64("latest_height", status.SyncInfo.LatestBlockHeight))
489+
persistence.latestQueriedBlock = status.SyncInfo.LatestBlockHeight
490+
return nil
491+
}
485492
if (persistence.latestQueriedBlock + 1) >= persistence.latestHeight {
486493
return nil
487494
}

0 commit comments

Comments
 (0)