ibc : replace strings.Contains to bytes.Contains (#8574)

Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
Prathyusha Lakkireddy 2021-02-12 19:02:03 +05:30 committed by GitHub
parent fc6c678bd2
commit e4b2d75dc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package keeper
import (
"bytes"
"context"
"fmt"
"sort"
@ -159,7 +160,7 @@ func (q Keeper) ConsensusStates(c context.Context, req *types.QueryConsensusStat
pageRes, err := query.FilteredPaginate(store, req.Pagination, func(key, value []byte, accumulate bool) (bool, error) {
// filter any metadata stored under consensus state key
if strings.Contains(string(key), "/") {
if bytes.Contains(key, []byte("/")) {
return false, nil
}