Skip to content

Commit

Permalink
Merge pull request #620 from niklr/579_v2
Browse files Browse the repository at this point in the history
fix: handle startHeight > endHeight
  • Loading branch information
viteshan authored Aug 12, 2022
2 parents 5be808c + 9cdc736 commit a1a2534
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rpcapi/api/ledger_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,9 @@ func GetLogs(c chain.Chain, rangeMap map[string]*Range, topics [][]types.Hash, p
if endHeight == 0 || endHeight > acc.Height {
endHeight = acc.Height
}
if startHeight > endHeight {
continue
}
for {
offset, count, finish := getHeightPage(startHeight, endHeight, 100)
if count == 0 {
Expand Down

0 comments on commit a1a2534

Please sign in to comment.