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:
M. J. Fromberger
2022-01-25 11:16:48 -08:00
committed by GitHub
parent f163acf499
commit 079c7af007
10 changed files with 39 additions and 79 deletions
+2 -1
View File
@@ -15,6 +15,7 @@ import (
cstypes "github.com/tendermint/tendermint/internal/consensus/types"
"github.com/tendermint/tendermint/internal/eventbus"
tmpubsub "github.com/tendermint/tendermint/internal/pubsub"
tmquery "github.com/tendermint/tendermint/internal/pubsub/query"
"github.com/tendermint/tendermint/libs/log"
tmrand "github.com/tendermint/tendermint/libs/rand"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
@@ -2076,7 +2077,7 @@ func subscribe(
ctx context.Context,
t *testing.T,
eventBus *eventbus.EventBus,
q tmpubsub.Query,
q *tmquery.Query,
) <-chan tmpubsub.Message {
t.Helper()
sub, err := eventBus.SubscribeWithArgs(ctx, tmpubsub.SubscribeArgs{