Skip to content

Commit aa717ee

Browse files
committed
fix: issue with max blocks in case of empty array
1 parent 55b9131 commit aa717ee

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

relayer/chains/wasm/wasm_chain_processor.go

+3
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,9 @@ func (ccp *WasmChainProcessor) shouldSkipProcessBlock(blocks []int64, block int6
396396
}
397397

398398
func findMaxBlock(blocks []int64) int64 {
399+
if len(blocks) == 0 {
400+
return 0
401+
}
399402
return blocks[len(blocks)-1]
400403
}
401404

0 commit comments

Comments
 (0)