diff --git a/rpcapi/api/ledger_v2.go b/rpcapi/api/ledger_v2.go index 02adc95df..b8b212c86 100644 --- a/rpcapi/api/ledger_v2.go +++ b/rpcapi/api/ledger_v2.go @@ -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 {