Fixed ordering of match.events in light client RPC (#9877)

This commit is contained in:
Jasmina Malicevic
2022-12-14 20:20:59 +01:00
committed by GitHub
parent 94a5fdfb5f
commit defe61604f

View File

@@ -160,7 +160,7 @@ func makeTxSearchFuncMatchEvents(c *lrpc.Client) rpcTxSearchFuncMatchEvents {
matchEvents bool,
) (*ctypes.ResultTxSearch, error) {
if matchEvents {
query = query + " AND match.events = 1"
query = "match.events = 1 AND " + query
}
return c.TxSearch(ctx.Context(), query, prove, page, perPage, orderBy)
}
@@ -185,7 +185,7 @@ func makeBlockSearchFuncMatchEvents(c *lrpc.Client) rpcBlockSearchFuncMatchEvent
matchEvents bool,
) (*ctypes.ResultBlockSearch, error) {
if matchEvents {
query = query + " AND match.events = 1"
query = "match.events = 1 AND " + query
}
return c.BlockSearch(ctx.Context(), query, page, perPage, orderBy)
}