Skip to content

Commit

Permalink
fix: issue with max blocks in case of empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
bcsainju committed Aug 7, 2024
1 parent 55b9131 commit aa717ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions relayer/chains/wasm/wasm_chain_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,9 @@ func (ccp *WasmChainProcessor) shouldSkipProcessBlock(blocks []int64, block int6
}

func findMaxBlock(blocks []int64) int64 {
if len(blocks) == 0 {
return 0
}
return blocks[len(blocks)-1]
}

Expand Down

0 comments on commit aa717ee

Please sign in to comment.