Skip to content

Commit

Permalink
Merge branch 'main' of github.com:irisnet/irismod into feature/issues…
Browse files Browse the repository at this point in the history
…_442
  • Loading branch information
avery committed Nov 18, 2024
2 parents a06ee11 + 624bd5b commit 72ea051
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
22 changes: 13 additions & 9 deletions modules/service/client/utils/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"
"strconv"
"strings"

tmbytes "github.com/cometbft/cometbft/libs/bytes"
rpcclient "github.com/cometbft/cometbft/rpc/client"
Expand Down Expand Up @@ -212,18 +213,21 @@ func QueryResponseByTxQuery(
) (
response types.Response, err error,
) {
//events := []string{
// fmt.Sprintf(
// "%s.%s='%s'",
// types.EventTypeRespondService,
// types.AttributeKeyRequestID,
// []byte(fmt.Sprintf("%d", requestID)),
// ),
//}
events := []string{
fmt.Sprintf(
"%s.%s='%s'",
types.EventTypeRespondService,
types.AttributeKeyRequestID,
[]byte(fmt.Sprintf("%d", requestID)),
),
}

// NOTE: SearchTxs is used to facilitate the txs query which does not currently
// support configurable pagination.
result, err := authtx.QueryTxsByEvents(cliCtx, 1, 1, "", "")

query := strings.Join(events, " AND ")

result, err := authtx.QueryTxsByEvents(cliCtx, 1, 1, query, "")
if err != nil {
return response, err
}
Expand Down
1 change: 1 addition & 0 deletions modules/service/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -214,5 +214,6 @@ replace (
github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7

// todo replace version
mods.irisnet.org/api => ../../api
mods.irisnet.org/simapp => ../../simapp
)
2 changes: 0 additions & 2 deletions modules/service/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1725,8 +1725,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
mods.irisnet.org/api v0.0.0-20240628054110-4cb043e0238a h1:/MLyi/CV2TrCVtGREoSpeLpXZvCgIUfbe3vqy8Lo/k4=
mods.irisnet.org/api v0.0.0-20240628054110-4cb043e0238a/go.mod h1:TpMaRRYSpqsXdeX4gDVFRj9ggedQ60Zcjs4iE2DIhsc=
nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k=
nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw=
Expand Down

0 comments on commit 72ea051

Please sign in to comment.