From 82738eb0166fc24606dab4336c5fa5b4d340c421 Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Wed, 15 Dec 2021 07:09:32 -0800 Subject: [PATCH] Move the libs/pubsub package to internal scope (#7451) No API changes, merely changes the import path. --- CHANGELOG_PENDING.md | 1 + internal/consensus/common_test.go | 2 +- internal/consensus/reactor_test.go | 2 +- internal/consensus/replay_file.go | 2 +- internal/consensus/replay_test.go | 2 +- internal/consensus/state_test.go | 2 +- internal/eventbus/event_bus.go | 2 +- internal/eventbus/event_bus_test.go | 4 ++-- internal/inspect/inspect_test.go | 2 +- internal/inspect/rpc/rpc.go | 2 +- {libs => internal}/pubsub/example_test.go | 4 ++-- {libs => internal}/pubsub/pubsub.go | 2 +- {libs => internal}/pubsub/pubsub_test.go | 4 ++-- {libs => internal}/pubsub/query/bench_test.go | 2 +- {libs => internal}/pubsub/query/query.go | 2 +- {libs => internal}/pubsub/query/query_test.go | 6 +++--- {libs => internal}/pubsub/query/syntax/doc.go | 0 {libs => internal}/pubsub/query/syntax/parser.go | 0 {libs => internal}/pubsub/query/syntax/scanner.go | 0 {libs => internal}/pubsub/query/syntax/syntax_test.go | 2 +- {libs => internal}/pubsub/subindex.go | 0 {libs => internal}/pubsub/subscription.go | 0 internal/rpc/core/blocks.go | 2 +- internal/rpc/core/events.go | 4 ++-- internal/rpc/core/tx.go | 2 +- internal/state/execution_test.go | 2 +- internal/state/indexer/block/kv/kv.go | 4 ++-- internal/state/indexer/block/kv/kv_test.go | 2 +- internal/state/indexer/block/kv/util.go | 2 +- internal/state/indexer/block/null/null.go | 2 +- internal/state/indexer/eventsink.go | 2 +- internal/state/indexer/indexer.go | 2 +- internal/state/indexer/indexer_service.go | 2 +- internal/state/indexer/mocks/event_sink.go | 2 +- internal/state/indexer/query_range.go | 2 +- internal/state/indexer/sink/kv/kv.go | 2 +- internal/state/indexer/sink/kv/kv_test.go | 2 +- internal/state/indexer/sink/null/null.go | 2 +- internal/state/indexer/sink/psql/psql.go | 2 +- internal/state/indexer/tx/kv/kv.go | 4 ++-- internal/state/indexer/tx/kv/kv_bench_test.go | 2 +- internal/state/indexer/tx/kv/kv_test.go | 2 +- internal/state/indexer/tx/null/null.go | 2 +- internal/state/mocks/event_sink.go | 2 +- light/proxy/proxy.go | 2 +- node/node.go | 2 +- node/node_test.go | 2 +- rpc/client/http/ws.go | 2 +- rpc/client/local/local.go | 4 ++-- types/events.go | 4 ++-- 50 files changed, 55 insertions(+), 54 deletions(-) rename {libs => internal}/pubsub/example_test.go (87%) rename {libs => internal}/pubsub/pubsub.go (99%) rename {libs => internal}/pubsub/pubsub_test.go (99%) rename {libs => internal}/pubsub/query/bench_test.go (94%) rename {libs => internal}/pubsub/query/query.go (99%) rename {libs => internal}/pubsub/query/query_test.go (97%) rename {libs => internal}/pubsub/query/syntax/doc.go (100%) rename {libs => internal}/pubsub/query/syntax/parser.go (100%) rename {libs => internal}/pubsub/query/syntax/scanner.go (100%) rename {libs => internal}/pubsub/query/syntax/syntax_test.go (98%) rename {libs => internal}/pubsub/subindex.go (100%) rename {libs => internal}/pubsub/subscription.go (100%) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 3e54a230b..e06bf4c06 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -27,6 +27,7 @@ Special thanks to external contributors on this release: - Go API + - [libs/pubsub] \#7451 Internalize the pubsub packages. (@creachadair) - [libs/sync] \#7450 Internalize and remove the library. (@creachadair) - [libs/async] \#7449 Move library to internal. (@creachadair) - [pubsub] \#7231 Remove unbuffered subscriptions and rework the Subscription interface. (@creachadair) diff --git a/internal/consensus/common_test.go b/internal/consensus/common_test.go index 0a61c95a3..ec031b23b 100644 --- a/internal/consensus/common_test.go +++ b/internal/consensus/common_test.go @@ -22,13 +22,13 @@ import ( cstypes "github.com/tendermint/tendermint/internal/consensus/types" "github.com/tendermint/tendermint/internal/eventbus" "github.com/tendermint/tendermint/internal/mempool" + tmpubsub "github.com/tendermint/tendermint/internal/pubsub" sm "github.com/tendermint/tendermint/internal/state" "github.com/tendermint/tendermint/internal/store" "github.com/tendermint/tendermint/internal/test/factory" tmbytes "github.com/tendermint/tendermint/libs/bytes" "github.com/tendermint/tendermint/libs/log" tmos "github.com/tendermint/tendermint/libs/os" - tmpubsub "github.com/tendermint/tendermint/libs/pubsub" tmtime "github.com/tendermint/tendermint/libs/time" "github.com/tendermint/tendermint/privval" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" diff --git a/internal/consensus/reactor_test.go b/internal/consensus/reactor_test.go index 8b7b7eb51..887f9fd3e 100644 --- a/internal/consensus/reactor_test.go +++ b/internal/consensus/reactor_test.go @@ -24,12 +24,12 @@ import ( "github.com/tendermint/tendermint/internal/mempool" "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/internal/p2p/p2ptest" + tmpubsub "github.com/tendermint/tendermint/internal/pubsub" sm "github.com/tendermint/tendermint/internal/state" statemocks "github.com/tendermint/tendermint/internal/state/mocks" "github.com/tendermint/tendermint/internal/store" "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" - tmpubsub "github.com/tendermint/tendermint/libs/pubsub" tmcons "github.com/tendermint/tendermint/proto/tendermint/consensus" "github.com/tendermint/tendermint/types" ) diff --git a/internal/consensus/replay_file.go b/internal/consensus/replay_file.go index 2c848a9f2..b9a14ff50 100644 --- a/internal/consensus/replay_file.go +++ b/internal/consensus/replay_file.go @@ -15,10 +15,10 @@ import ( "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/internal/eventbus" "github.com/tendermint/tendermint/internal/proxy" + tmpubsub "github.com/tendermint/tendermint/internal/pubsub" sm "github.com/tendermint/tendermint/internal/state" "github.com/tendermint/tendermint/internal/store" "github.com/tendermint/tendermint/libs/log" - tmpubsub "github.com/tendermint/tendermint/libs/pubsub" "github.com/tendermint/tendermint/types" ) diff --git a/internal/consensus/replay_test.go b/internal/consensus/replay_test.go index 56a4924cd..76e020c22 100644 --- a/internal/consensus/replay_test.go +++ b/internal/consensus/replay_test.go @@ -28,12 +28,12 @@ import ( "github.com/tendermint/tendermint/internal/eventbus" "github.com/tendermint/tendermint/internal/mempool" "github.com/tendermint/tendermint/internal/proxy" + "github.com/tendermint/tendermint/internal/pubsub" sm "github.com/tendermint/tendermint/internal/state" sf "github.com/tendermint/tendermint/internal/state/test/factory" "github.com/tendermint/tendermint/internal/store" "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/libs/pubsub" tmrand "github.com/tendermint/tendermint/libs/rand" "github.com/tendermint/tendermint/privval" tmstate "github.com/tendermint/tendermint/proto/tendermint/state" diff --git a/internal/consensus/state_test.go b/internal/consensus/state_test.go index 387650704..92caca7a3 100644 --- a/internal/consensus/state_test.go +++ b/internal/consensus/state_test.go @@ -14,8 +14,8 @@ import ( "github.com/tendermint/tendermint/crypto/tmhash" cstypes "github.com/tendermint/tendermint/internal/consensus/types" "github.com/tendermint/tendermint/internal/eventbus" + tmpubsub "github.com/tendermint/tendermint/internal/pubsub" "github.com/tendermint/tendermint/libs/log" - tmpubsub "github.com/tendermint/tendermint/libs/pubsub" tmrand "github.com/tendermint/tendermint/libs/rand" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" diff --git a/internal/eventbus/event_bus.go b/internal/eventbus/event_bus.go index 3272fe8d7..58f357165 100644 --- a/internal/eventbus/event_bus.go +++ b/internal/eventbus/event_bus.go @@ -6,8 +6,8 @@ import ( "strings" abci "github.com/tendermint/tendermint/abci/types" + tmpubsub "github.com/tendermint/tendermint/internal/pubsub" "github.com/tendermint/tendermint/libs/log" - tmpubsub "github.com/tendermint/tendermint/libs/pubsub" "github.com/tendermint/tendermint/libs/service" "github.com/tendermint/tendermint/types" ) diff --git a/internal/eventbus/event_bus_test.go b/internal/eventbus/event_bus_test.go index 72b1094fb..66581b6cc 100644 --- a/internal/eventbus/event_bus_test.go +++ b/internal/eventbus/event_bus_test.go @@ -12,9 +12,9 @@ import ( abci "github.com/tendermint/tendermint/abci/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" - tmpubsub "github.com/tendermint/tendermint/libs/pubsub" - tmquery "github.com/tendermint/tendermint/libs/pubsub/query" "github.com/tendermint/tendermint/types" ) diff --git a/internal/inspect/inspect_test.go b/internal/inspect/inspect_test.go index a75777741..c4ec3695e 100644 --- a/internal/inspect/inspect_test.go +++ b/internal/inspect/inspect_test.go @@ -17,11 +17,11 @@ import ( abcitypes "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/internal/inspect" + "github.com/tendermint/tendermint/internal/pubsub/query" "github.com/tendermint/tendermint/internal/state/indexer" indexermocks "github.com/tendermint/tendermint/internal/state/indexer/mocks" statemocks "github.com/tendermint/tendermint/internal/state/mocks" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/libs/pubsub/query" "github.com/tendermint/tendermint/proto/tendermint/state" httpclient "github.com/tendermint/tendermint/rpc/client/http" "github.com/tendermint/tendermint/types" diff --git a/internal/inspect/rpc/rpc.go b/internal/inspect/rpc/rpc.go index cfcddcd44..7ed47962a 100644 --- a/internal/inspect/rpc/rpc.go +++ b/internal/inspect/rpc/rpc.go @@ -9,11 +9,11 @@ import ( "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/internal/consensus" + "github.com/tendermint/tendermint/internal/pubsub" "github.com/tendermint/tendermint/internal/rpc/core" "github.com/tendermint/tendermint/internal/state" "github.com/tendermint/tendermint/internal/state/indexer" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/libs/pubsub" "github.com/tendermint/tendermint/rpc/jsonrpc/server" "github.com/tendermint/tendermint/types" ) diff --git a/libs/pubsub/example_test.go b/internal/pubsub/example_test.go similarity index 87% rename from libs/pubsub/example_test.go rename to internal/pubsub/example_test.go index 0cf7b5853..39b179981 100644 --- a/libs/pubsub/example_test.go +++ b/internal/pubsub/example_test.go @@ -7,9 +7,9 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/internal/pubsub" + "github.com/tendermint/tendermint/internal/pubsub/query" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/libs/pubsub" - "github.com/tendermint/tendermint/libs/pubsub/query" ) func TestExample(t *testing.T) { diff --git a/libs/pubsub/pubsub.go b/internal/pubsub/pubsub.go similarity index 99% rename from libs/pubsub/pubsub.go rename to internal/pubsub/pubsub.go index cd37a17ee..13526febb 100644 --- a/libs/pubsub/pubsub.go +++ b/internal/pubsub/pubsub.go @@ -5,7 +5,7 @@ // Clients register subscriptions with a query to select which messages they // wish to receive. When messages are published, they are broadcast to all // clients whose subscription query matches that message. Queries are -// constructed using the github.com/tendermint/tendermint/libs/pubsub/query +// constructed using the github.com/tendermint/tendermint/internal/pubsub/query // package. // // Example: diff --git a/libs/pubsub/pubsub_test.go b/internal/pubsub/pubsub_test.go similarity index 99% rename from libs/pubsub/pubsub_test.go rename to internal/pubsub/pubsub_test.go index 601e48823..c4da551d0 100644 --- a/libs/pubsub/pubsub_test.go +++ b/internal/pubsub/pubsub_test.go @@ -9,9 +9,9 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/internal/pubsub" + "github.com/tendermint/tendermint/internal/pubsub/query" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/libs/pubsub" - "github.com/tendermint/tendermint/libs/pubsub/query" ) const ( diff --git a/libs/pubsub/query/bench_test.go b/internal/pubsub/query/bench_test.go similarity index 94% rename from libs/pubsub/query/bench_test.go rename to internal/pubsub/query/bench_test.go index 894c16628..28f5184ab 100644 --- a/libs/pubsub/query/bench_test.go +++ b/internal/pubsub/query/bench_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/pubsub/query" + "github.com/tendermint/tendermint/internal/pubsub/query" ) const testQuery = `tm.events.type='NewBlock' AND abci.account.name='Igor'` diff --git a/libs/pubsub/query/query.go b/internal/pubsub/query/query.go similarity index 99% rename from libs/pubsub/query/query.go rename to internal/pubsub/query/query.go index e874f037c..ce70238a5 100644 --- a/libs/pubsub/query/query.go +++ b/internal/pubsub/query/query.go @@ -20,7 +20,7 @@ import ( "time" "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/pubsub/query/syntax" + "github.com/tendermint/tendermint/internal/pubsub/query/syntax" ) // All is a query that matches all events. diff --git a/libs/pubsub/query/query_test.go b/internal/pubsub/query/query_test.go similarity index 97% rename from libs/pubsub/query/query_test.go rename to internal/pubsub/query/query_test.go index b0d1fb7fe..ddecae0ad 100644 --- a/libs/pubsub/query/query_test.go +++ b/internal/pubsub/query/query_test.go @@ -7,9 +7,9 @@ import ( "time" "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/pubsub" - "github.com/tendermint/tendermint/libs/pubsub/query" - "github.com/tendermint/tendermint/libs/pubsub/query/syntax" + "github.com/tendermint/tendermint/internal/pubsub" + "github.com/tendermint/tendermint/internal/pubsub/query" + "github.com/tendermint/tendermint/internal/pubsub/query/syntax" ) var _ pubsub.Query = (*query.Query)(nil) diff --git a/libs/pubsub/query/syntax/doc.go b/internal/pubsub/query/syntax/doc.go similarity index 100% rename from libs/pubsub/query/syntax/doc.go rename to internal/pubsub/query/syntax/doc.go diff --git a/libs/pubsub/query/syntax/parser.go b/internal/pubsub/query/syntax/parser.go similarity index 100% rename from libs/pubsub/query/syntax/parser.go rename to internal/pubsub/query/syntax/parser.go diff --git a/libs/pubsub/query/syntax/scanner.go b/internal/pubsub/query/syntax/scanner.go similarity index 100% rename from libs/pubsub/query/syntax/scanner.go rename to internal/pubsub/query/syntax/scanner.go diff --git a/libs/pubsub/query/syntax/syntax_test.go b/internal/pubsub/query/syntax/syntax_test.go similarity index 98% rename from libs/pubsub/query/syntax/syntax_test.go rename to internal/pubsub/query/syntax/syntax_test.go index ac95fd8b1..ac0473beb 100644 --- a/libs/pubsub/query/syntax/syntax_test.go +++ b/internal/pubsub/query/syntax/syntax_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/tendermint/tendermint/libs/pubsub/query/syntax" + "github.com/tendermint/tendermint/internal/pubsub/query/syntax" ) func TestScanner(t *testing.T) { diff --git a/libs/pubsub/subindex.go b/internal/pubsub/subindex.go similarity index 100% rename from libs/pubsub/subindex.go rename to internal/pubsub/subindex.go diff --git a/libs/pubsub/subscription.go b/internal/pubsub/subscription.go similarity index 100% rename from libs/pubsub/subscription.go rename to internal/pubsub/subscription.go diff --git a/internal/rpc/core/blocks.go b/internal/rpc/core/blocks.go index 2e7f24726..725a2f972 100644 --- a/internal/rpc/core/blocks.go +++ b/internal/rpc/core/blocks.go @@ -4,10 +4,10 @@ import ( "fmt" "sort" + tmquery "github.com/tendermint/tendermint/internal/pubsub/query" "github.com/tendermint/tendermint/internal/state/indexer" "github.com/tendermint/tendermint/libs/bytes" tmmath "github.com/tendermint/tendermint/libs/math" - tmquery "github.com/tendermint/tendermint/libs/pubsub/query" "github.com/tendermint/tendermint/rpc/coretypes" rpctypes "github.com/tendermint/tendermint/rpc/jsonrpc/types" "github.com/tendermint/tendermint/types" diff --git a/internal/rpc/core/events.go b/internal/rpc/core/events.go index 73ca8a755..965291cdb 100644 --- a/internal/rpc/core/events.go +++ b/internal/rpc/core/events.go @@ -6,8 +6,8 @@ import ( "fmt" "time" - tmpubsub "github.com/tendermint/tendermint/libs/pubsub" - tmquery "github.com/tendermint/tendermint/libs/pubsub/query" + tmpubsub "github.com/tendermint/tendermint/internal/pubsub" + tmquery "github.com/tendermint/tendermint/internal/pubsub/query" "github.com/tendermint/tendermint/rpc/coretypes" rpctypes "github.com/tendermint/tendermint/rpc/jsonrpc/types" ) diff --git a/internal/rpc/core/tx.go b/internal/rpc/core/tx.go index 7ba2bf90c..98fedc10a 100644 --- a/internal/rpc/core/tx.go +++ b/internal/rpc/core/tx.go @@ -5,10 +5,10 @@ import ( "fmt" "sort" + tmquery "github.com/tendermint/tendermint/internal/pubsub/query" "github.com/tendermint/tendermint/internal/state/indexer" "github.com/tendermint/tendermint/libs/bytes" tmmath "github.com/tendermint/tendermint/libs/math" - tmquery "github.com/tendermint/tendermint/libs/pubsub/query" "github.com/tendermint/tendermint/rpc/coretypes" rpctypes "github.com/tendermint/tendermint/rpc/jsonrpc/types" "github.com/tendermint/tendermint/types" diff --git a/internal/state/execution_test.go b/internal/state/execution_test.go index 4f68bd016..32b26b425 100644 --- a/internal/state/execution_test.go +++ b/internal/state/execution_test.go @@ -19,12 +19,12 @@ import ( "github.com/tendermint/tendermint/internal/eventbus" mmock "github.com/tendermint/tendermint/internal/mempool/mock" "github.com/tendermint/tendermint/internal/proxy" + "github.com/tendermint/tendermint/internal/pubsub" sm "github.com/tendermint/tendermint/internal/state" "github.com/tendermint/tendermint/internal/state/mocks" sf "github.com/tendermint/tendermint/internal/state/test/factory" "github.com/tendermint/tendermint/internal/store" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/libs/pubsub" tmtime "github.com/tendermint/tendermint/libs/time" "github.com/tendermint/tendermint/types" "github.com/tendermint/tendermint/version" diff --git a/internal/state/indexer/block/kv/kv.go b/internal/state/indexer/block/kv/kv.go index 26fdcf1fc..2ac133bf1 100644 --- a/internal/state/indexer/block/kv/kv.go +++ b/internal/state/indexer/block/kv/kv.go @@ -12,9 +12,9 @@ import ( dbm "github.com/tendermint/tm-db" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/internal/pubsub/query" + "github.com/tendermint/tendermint/internal/pubsub/query/syntax" "github.com/tendermint/tendermint/internal/state/indexer" - "github.com/tendermint/tendermint/libs/pubsub/query" - "github.com/tendermint/tendermint/libs/pubsub/query/syntax" "github.com/tendermint/tendermint/types" ) diff --git a/internal/state/indexer/block/kv/kv_test.go b/internal/state/indexer/block/kv/kv_test.go index 650723dbf..b7970a177 100644 --- a/internal/state/indexer/block/kv/kv_test.go +++ b/internal/state/indexer/block/kv/kv_test.go @@ -9,8 +9,8 @@ import ( dbm "github.com/tendermint/tm-db" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/internal/pubsub/query" blockidxkv "github.com/tendermint/tendermint/internal/state/indexer/block/kv" - "github.com/tendermint/tendermint/libs/pubsub/query" "github.com/tendermint/tendermint/types" ) diff --git a/internal/state/indexer/block/kv/util.go b/internal/state/indexer/block/kv/util.go index fff88046c..28e22718c 100644 --- a/internal/state/indexer/block/kv/util.go +++ b/internal/state/indexer/block/kv/util.go @@ -6,7 +6,7 @@ import ( "strconv" "github.com/google/orderedcode" - "github.com/tendermint/tendermint/libs/pubsub/query/syntax" + "github.com/tendermint/tendermint/internal/pubsub/query/syntax" "github.com/tendermint/tendermint/types" ) diff --git a/internal/state/indexer/block/null/null.go b/internal/state/indexer/block/null/null.go index 9b28d93bb..7d5453848 100644 --- a/internal/state/indexer/block/null/null.go +++ b/internal/state/indexer/block/null/null.go @@ -4,8 +4,8 @@ import ( "context" "errors" + "github.com/tendermint/tendermint/internal/pubsub/query" "github.com/tendermint/tendermint/internal/state/indexer" - "github.com/tendermint/tendermint/libs/pubsub/query" "github.com/tendermint/tendermint/types" ) diff --git a/internal/state/indexer/eventsink.go b/internal/state/indexer/eventsink.go index dba50b6af..9b4d6f561 100644 --- a/internal/state/indexer/eventsink.go +++ b/internal/state/indexer/eventsink.go @@ -4,7 +4,7 @@ import ( "context" abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/pubsub/query" + "github.com/tendermint/tendermint/internal/pubsub/query" "github.com/tendermint/tendermint/types" ) diff --git a/internal/state/indexer/indexer.go b/internal/state/indexer/indexer.go index 5c238e137..a1b78a257 100644 --- a/internal/state/indexer/indexer.go +++ b/internal/state/indexer/indexer.go @@ -5,7 +5,7 @@ import ( "errors" abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/pubsub/query" + "github.com/tendermint/tendermint/internal/pubsub/query" "github.com/tendermint/tendermint/types" ) diff --git a/internal/state/indexer/indexer_service.go b/internal/state/indexer/indexer_service.go index 83810953b..f1bf763b2 100644 --- a/internal/state/indexer/indexer_service.go +++ b/internal/state/indexer/indexer_service.go @@ -5,8 +5,8 @@ import ( "time" "github.com/tendermint/tendermint/internal/eventbus" + "github.com/tendermint/tendermint/internal/pubsub" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/libs/pubsub" "github.com/tendermint/tendermint/libs/service" "github.com/tendermint/tendermint/types" ) diff --git a/internal/state/indexer/mocks/event_sink.go b/internal/state/indexer/mocks/event_sink.go index 98b32e935..d5555a417 100644 --- a/internal/state/indexer/mocks/event_sink.go +++ b/internal/state/indexer/mocks/event_sink.go @@ -8,7 +8,7 @@ import ( mock "github.com/stretchr/testify/mock" indexer "github.com/tendermint/tendermint/internal/state/indexer" - query "github.com/tendermint/tendermint/libs/pubsub/query" + query "github.com/tendermint/tendermint/internal/pubsub/query" tenderminttypes "github.com/tendermint/tendermint/types" diff --git a/internal/state/indexer/query_range.go b/internal/state/indexer/query_range.go index 4c026955d..ff54cd32b 100644 --- a/internal/state/indexer/query_range.go +++ b/internal/state/indexer/query_range.go @@ -3,7 +3,7 @@ package indexer import ( "time" - "github.com/tendermint/tendermint/libs/pubsub/query/syntax" + "github.com/tendermint/tendermint/internal/pubsub/query/syntax" ) // QueryRanges defines a mapping between a composite event key and a QueryRange. diff --git a/internal/state/indexer/sink/kv/kv.go b/internal/state/indexer/sink/kv/kv.go index fe7068a1b..10282fd34 100644 --- a/internal/state/indexer/sink/kv/kv.go +++ b/internal/state/indexer/sink/kv/kv.go @@ -6,10 +6,10 @@ import ( dbm "github.com/tendermint/tm-db" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/internal/pubsub/query" "github.com/tendermint/tendermint/internal/state/indexer" kvb "github.com/tendermint/tendermint/internal/state/indexer/block/kv" kvt "github.com/tendermint/tendermint/internal/state/indexer/tx/kv" - "github.com/tendermint/tendermint/libs/pubsub/query" "github.com/tendermint/tendermint/types" ) diff --git a/internal/state/indexer/sink/kv/kv_test.go b/internal/state/indexer/sink/kv/kv_test.go index 47b1f5364..8955550d0 100644 --- a/internal/state/indexer/sink/kv/kv_test.go +++ b/internal/state/indexer/sink/kv/kv_test.go @@ -11,9 +11,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/internal/pubsub/query" "github.com/tendermint/tendermint/internal/state/indexer" kvtx "github.com/tendermint/tendermint/internal/state/indexer/tx/kv" - "github.com/tendermint/tendermint/libs/pubsub/query" "github.com/tendermint/tendermint/types" ) diff --git a/internal/state/indexer/sink/null/null.go b/internal/state/indexer/sink/null/null.go index f58142f21..c436bdf0f 100644 --- a/internal/state/indexer/sink/null/null.go +++ b/internal/state/indexer/sink/null/null.go @@ -4,8 +4,8 @@ import ( "context" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/internal/pubsub/query" "github.com/tendermint/tendermint/internal/state/indexer" - "github.com/tendermint/tendermint/libs/pubsub/query" "github.com/tendermint/tendermint/types" ) diff --git a/internal/state/indexer/sink/psql/psql.go b/internal/state/indexer/sink/psql/psql.go index 18e95b97d..1208bca19 100644 --- a/internal/state/indexer/sink/psql/psql.go +++ b/internal/state/indexer/sink/psql/psql.go @@ -11,8 +11,8 @@ import ( "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/internal/pubsub/query" "github.com/tendermint/tendermint/internal/state/indexer" - "github.com/tendermint/tendermint/libs/pubsub/query" "github.com/tendermint/tendermint/types" ) diff --git a/internal/state/indexer/tx/kv/kv.go b/internal/state/indexer/tx/kv/kv.go index 4bcff958b..e543959ea 100644 --- a/internal/state/indexer/tx/kv/kv.go +++ b/internal/state/indexer/tx/kv/kv.go @@ -12,9 +12,9 @@ import ( dbm "github.com/tendermint/tm-db" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/internal/pubsub/query" + "github.com/tendermint/tendermint/internal/pubsub/query/syntax" indexer "github.com/tendermint/tendermint/internal/state/indexer" - "github.com/tendermint/tendermint/libs/pubsub/query" - "github.com/tendermint/tendermint/libs/pubsub/query/syntax" "github.com/tendermint/tendermint/types" ) diff --git a/internal/state/indexer/tx/kv/kv_bench_test.go b/internal/state/indexer/tx/kv/kv_bench_test.go index b8f72b2fa..7744c3183 100644 --- a/internal/state/indexer/tx/kv/kv_bench_test.go +++ b/internal/state/indexer/tx/kv/kv_bench_test.go @@ -10,7 +10,7 @@ import ( dbm "github.com/tendermint/tm-db" abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/pubsub/query" + "github.com/tendermint/tendermint/internal/pubsub/query" "github.com/tendermint/tendermint/types" ) diff --git a/internal/state/indexer/tx/kv/kv_test.go b/internal/state/indexer/tx/kv/kv_test.go index e65f9ca2d..018fe51b4 100644 --- a/internal/state/indexer/tx/kv/kv_test.go +++ b/internal/state/indexer/tx/kv/kv_test.go @@ -12,8 +12,8 @@ import ( dbm "github.com/tendermint/tm-db" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/internal/pubsub/query" "github.com/tendermint/tendermint/internal/state/indexer" - "github.com/tendermint/tendermint/libs/pubsub/query" tmrand "github.com/tendermint/tendermint/libs/rand" "github.com/tendermint/tendermint/types" ) diff --git a/internal/state/indexer/tx/null/null.go b/internal/state/indexer/tx/null/null.go index 0da7fc683..dea5d570f 100644 --- a/internal/state/indexer/tx/null/null.go +++ b/internal/state/indexer/tx/null/null.go @@ -5,8 +5,8 @@ import ( "errors" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/internal/pubsub/query" "github.com/tendermint/tendermint/internal/state/indexer" - "github.com/tendermint/tendermint/libs/pubsub/query" ) var _ indexer.TxIndexer = (*TxIndex)(nil) diff --git a/internal/state/mocks/event_sink.go b/internal/state/mocks/event_sink.go index b8a8fc464..97e3aff76 100644 --- a/internal/state/mocks/event_sink.go +++ b/internal/state/mocks/event_sink.go @@ -8,7 +8,7 @@ import ( mock "github.com/stretchr/testify/mock" indexer "github.com/tendermint/tendermint/internal/state/indexer" - query "github.com/tendermint/tendermint/libs/pubsub/query" + query "github.com/tendermint/tendermint/internal/pubsub/query" tenderminttypes "github.com/tendermint/tendermint/types" diff --git a/light/proxy/proxy.go b/light/proxy/proxy.go index 60d542b7c..444eefb88 100644 --- a/light/proxy/proxy.go +++ b/light/proxy/proxy.go @@ -6,8 +6,8 @@ import ( "net" "net/http" + tmpubsub "github.com/tendermint/tendermint/internal/pubsub" "github.com/tendermint/tendermint/libs/log" - tmpubsub "github.com/tendermint/tendermint/libs/pubsub" "github.com/tendermint/tendermint/light" lrpc "github.com/tendermint/tendermint/light/rpc" rpchttp "github.com/tendermint/tendermint/rpc/client/http" diff --git a/node/node.go b/node/node.go index 9878f60e5..5de408945 100644 --- a/node/node.go +++ b/node/node.go @@ -21,6 +21,7 @@ import ( "github.com/tendermint/tendermint/internal/mempool" "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/internal/proxy" + tmpubsub "github.com/tendermint/tendermint/internal/pubsub" rpccore "github.com/tendermint/tendermint/internal/rpc/core" sm "github.com/tendermint/tendermint/internal/state" "github.com/tendermint/tendermint/internal/state/indexer" @@ -28,7 +29,6 @@ import ( "github.com/tendermint/tendermint/internal/store" "github.com/tendermint/tendermint/libs/log" tmnet "github.com/tendermint/tendermint/libs/net" - tmpubsub "github.com/tendermint/tendermint/libs/pubsub" "github.com/tendermint/tendermint/libs/service" "github.com/tendermint/tendermint/libs/strings" tmtime "github.com/tendermint/tendermint/libs/time" diff --git a/node/node_test.go b/node/node_test.go index 666192a5c..ad3980df6 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -24,12 +24,12 @@ import ( "github.com/tendermint/tendermint/internal/evidence" "github.com/tendermint/tendermint/internal/mempool" "github.com/tendermint/tendermint/internal/proxy" + "github.com/tendermint/tendermint/internal/pubsub" sm "github.com/tendermint/tendermint/internal/state" "github.com/tendermint/tendermint/internal/state/indexer" "github.com/tendermint/tendermint/internal/store" "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/libs/pubsub" tmrand "github.com/tendermint/tendermint/libs/rand" "github.com/tendermint/tendermint/libs/service" tmtime "github.com/tendermint/tendermint/libs/time" diff --git a/rpc/client/http/ws.go b/rpc/client/http/ws.go index 320540450..ceda36c3c 100644 --- a/rpc/client/http/ws.go +++ b/rpc/client/http/ws.go @@ -8,8 +8,8 @@ import ( "sync" "time" + "github.com/tendermint/tendermint/internal/pubsub" tmjson "github.com/tendermint/tendermint/libs/json" - "github.com/tendermint/tendermint/libs/pubsub" rpcclient "github.com/tendermint/tendermint/rpc/client" "github.com/tendermint/tendermint/rpc/coretypes" jsonrpcclient "github.com/tendermint/tendermint/rpc/jsonrpc/client" diff --git a/rpc/client/local/local.go b/rpc/client/local/local.go index 799639a04..4a833af9c 100644 --- a/rpc/client/local/local.go +++ b/rpc/client/local/local.go @@ -7,11 +7,11 @@ import ( "time" "github.com/tendermint/tendermint/internal/eventbus" + "github.com/tendermint/tendermint/internal/pubsub" + "github.com/tendermint/tendermint/internal/pubsub/query" rpccore "github.com/tendermint/tendermint/internal/rpc/core" "github.com/tendermint/tendermint/libs/bytes" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/libs/pubsub" - "github.com/tendermint/tendermint/libs/pubsub/query" rpcclient "github.com/tendermint/tendermint/rpc/client" "github.com/tendermint/tendermint/rpc/coretypes" rpctypes "github.com/tendermint/tendermint/rpc/jsonrpc/types" diff --git a/types/events.go b/types/events.go index 86935ba25..00bed4b60 100644 --- a/types/events.go +++ b/types/events.go @@ -6,9 +6,9 @@ import ( "strings" abci "github.com/tendermint/tendermint/abci/types" + tmpubsub "github.com/tendermint/tendermint/internal/pubsub" + tmquery "github.com/tendermint/tendermint/internal/pubsub/query" tmjson "github.com/tendermint/tendermint/libs/json" - tmpubsub "github.com/tendermint/tendermint/libs/pubsub" - tmquery "github.com/tendermint/tendermint/libs/pubsub/query" ) // Reserved event types (alphabetically sorted).