diff --git a/x/sp/keeper/grpc_query.go b/x/sp/keeper/grpc_query.go index 1fe961ee1..63e103fb8 100644 --- a/x/sp/keeper/grpc_query.go +++ b/x/sp/keeper/grpc_query.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "math/rand" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" @@ -31,6 +32,10 @@ func (k Keeper) StorageProviders(goCtx context.Context, req *types.QueryStorageP return nil, status.Error(codes.Internal, err.Error()) } + rand.Shuffle(len(sps), func(i, j int) { + sps[i], sps[j] = sps[j], sps[i] + }) + return &types.QueryStorageProvidersResponse{Sps: sps, Pagination: pageRes}, nil }