mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-07 13:55:17 +00:00
pubsub: use concrete queries instead of an interface (#7686)
Remove the pubsub.Query interface and instead use the concrete query type. Nothing uses any other implementation but pubsub/query. * query: remove the error from the Matches method * Update all usage.
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
"github.com/tendermint/tendermint/internal/jsontypes"
|
||||
tmpubsub "github.com/tendermint/tendermint/internal/pubsub"
|
||||
tmquery "github.com/tendermint/tendermint/internal/pubsub/query"
|
||||
)
|
||||
|
||||
@@ -266,11 +265,11 @@ var (
|
||||
EventQueryStateSyncStatus = QueryForEvent(EventStateSyncStatusValue)
|
||||
)
|
||||
|
||||
func EventQueryTxFor(tx Tx) tmpubsub.Query {
|
||||
func EventQueryTxFor(tx Tx) *tmquery.Query {
|
||||
return tmquery.MustCompile(fmt.Sprintf("%s='%s' AND %s='%X'", EventTypeKey, EventTxValue, TxHashKey, tx.Hash()))
|
||||
}
|
||||
|
||||
func QueryForEvent(eventValue string) tmpubsub.Query {
|
||||
func QueryForEvent(eventValue string) *tmquery.Query {
|
||||
return tmquery.MustCompile(fmt.Sprintf("%s='%s'", EventTypeKey, eventValue))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user