Skip to content

Commit

Permalink
more nits
Browse files Browse the repository at this point in the history
  • Loading branch information
czarcas7ic committed Apr 20, 2024
1 parent e2fedc4 commit d43a3bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions state/txindex/kv/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func (txi *TxIndex) Search(ctx context.Context, q *query.Query, page, perPage in
hashKeys = append(hashKeys, k)
}

// Sort by height, and then lexicographically for the same height
// Sort by height
sort.Slice(hashKeys, func(i, j int) bool {
hi := filteredHashes[hashKeys[i]].Height
hj := filteredHashes[hashKeys[j]].Height
Expand All @@ -342,8 +342,8 @@ func (txi *TxIndex) Search(ctx context.Context, q *query.Query, page, perPage in
if startIndex >= len(hashKeys) {
return []*abci.TxResult{}, 0, nil
}
paginatedKeys := hashKeys[startIndex:endIndex]

paginatedKeys := hashKeys[startIndex:endIndex]
results := make([]*abci.TxResult, 0, len(paginatedKeys))
resultMap := make(map[string]struct{})
RESULTS_LOOP:
Expand Down

0 comments on commit d43a3bb

Please sign in to comment.