From bb8ffcb95bb2eafc297b7e162bd5e58d09c8ea1e Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Thu, 23 Sep 2021 11:46:42 -0400 Subject: [PATCH] store: move pacakge to internal (#6978) --- cmd/tendermint/commands/reindex_event.go | 2 +- internal/blocksync/v0/reactor.go | 2 +- internal/blocksync/v0/reactor_test.go | 2 +- internal/blocksync/v2/reactor_test.go | 2 +- internal/consensus/byzantine_test.go | 2 +- internal/consensus/common_test.go | 2 +- internal/consensus/mempool_test.go | 2 +- internal/consensus/reactor_test.go | 2 +- internal/consensus/replay_file.go | 2 +- internal/consensus/replay_test.go | 2 +- internal/consensus/wal_generator.go | 2 +- internal/evidence/pool_test.go | 2 +- internal/inspect/inspect.go | 2 +- internal/state/execution_test.go | 2 +- internal/state/validation_test.go | 2 +- internal/statesync/reactor.go | 2 +- internal/statesync/reactor_test.go | 2 +- {store => internal/store}/store.go | 0 {store => internal/store}/store_test.go | 0 node/node.go | 2 +- node/node_test.go | 2 +- node/setup.go | 2 +- 22 files changed, 20 insertions(+), 20 deletions(-) rename {store => internal/store}/store.go (100%) rename {store => internal/store}/store_test.go (100%) diff --git a/cmd/tendermint/commands/reindex_event.go b/cmd/tendermint/commands/reindex_event.go index ca176df11..9545e32d7 100644 --- a/cmd/tendermint/commands/reindex_event.go +++ b/cmd/tendermint/commands/reindex_event.go @@ -15,8 +15,8 @@ import ( "github.com/tendermint/tendermint/internal/state/indexer" "github.com/tendermint/tendermint/internal/state/indexer/sink/kv" "github.com/tendermint/tendermint/internal/state/indexer/sink/psql" + "github.com/tendermint/tendermint/internal/store" "github.com/tendermint/tendermint/rpc/coretypes" - "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" ) diff --git a/internal/blocksync/v0/reactor.go b/internal/blocksync/v0/reactor.go index 4c378d040..286df0ef0 100644 --- a/internal/blocksync/v0/reactor.go +++ b/internal/blocksync/v0/reactor.go @@ -10,11 +10,11 @@ import ( "github.com/tendermint/tendermint/internal/consensus" "github.com/tendermint/tendermint/internal/p2p" sm "github.com/tendermint/tendermint/internal/state" + "github.com/tendermint/tendermint/internal/store" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" tmsync "github.com/tendermint/tendermint/libs/sync" bcproto "github.com/tendermint/tendermint/proto/tendermint/blocksync" - "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" ) diff --git a/internal/blocksync/v0/reactor_test.go b/internal/blocksync/v0/reactor_test.go index 14e0fbf1d..e947581aa 100644 --- a/internal/blocksync/v0/reactor_test.go +++ b/internal/blocksync/v0/reactor_test.go @@ -18,10 +18,10 @@ import ( "github.com/tendermint/tendermint/internal/proxy" 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" bcproto "github.com/tendermint/tendermint/proto/tendermint/blocksync" - "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" ) diff --git a/internal/blocksync/v2/reactor_test.go b/internal/blocksync/v2/reactor_test.go index 8cb675a0a..579a46c19 100644 --- a/internal/blocksync/v2/reactor_test.go +++ b/internal/blocksync/v2/reactor_test.go @@ -24,11 +24,11 @@ import ( "github.com/tendermint/tendermint/internal/proxy" sm "github.com/tendermint/tendermint/internal/state" sf "github.com/tendermint/tendermint/internal/state/test/factory" + tmstore "github.com/tendermint/tendermint/internal/store" "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" bcproto "github.com/tendermint/tendermint/proto/tendermint/blocksync" - tmstore "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" ) diff --git a/internal/consensus/byzantine_test.go b/internal/consensus/byzantine_test.go index bff9f4ace..81a4f8be8 100644 --- a/internal/consensus/byzantine_test.go +++ b/internal/consensus/byzantine_test.go @@ -19,11 +19,11 @@ import ( mempoolv0 "github.com/tendermint/tendermint/internal/mempool/v0" "github.com/tendermint/tendermint/internal/p2p" sm "github.com/tendermint/tendermint/internal/state" + "github.com/tendermint/tendermint/internal/store" "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" tmcons "github.com/tendermint/tendermint/proto/tendermint/consensus" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" ) diff --git a/internal/consensus/common_test.go b/internal/consensus/common_test.go index 2bd926c45..5251b0fdb 100644 --- a/internal/consensus/common_test.go +++ b/internal/consensus/common_test.go @@ -24,6 +24,7 @@ import ( tmsync "github.com/tendermint/tendermint/internal/libs/sync" mempoolv0 "github.com/tendermint/tendermint/internal/mempool/v0" 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" @@ -32,7 +33,6 @@ import ( tmtime "github.com/tendermint/tendermint/libs/time" "github.com/tendermint/tendermint/privval" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" ) diff --git a/internal/consensus/mempool_test.go b/internal/consensus/mempool_test.go index 58784a2ee..4b2037469 100644 --- a/internal/consensus/mempool_test.go +++ b/internal/consensus/mempool_test.go @@ -16,7 +16,7 @@ import ( abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/internal/mempool" sm "github.com/tendermint/tendermint/internal/state" - "github.com/tendermint/tendermint/store" + "github.com/tendermint/tendermint/internal/store" "github.com/tendermint/tendermint/types" ) diff --git a/internal/consensus/reactor_test.go b/internal/consensus/reactor_test.go index a5f06c884..baffbac30 100644 --- a/internal/consensus/reactor_test.go +++ b/internal/consensus/reactor_test.go @@ -26,11 +26,11 @@ import ( "github.com/tendermint/tendermint/internal/p2p/p2ptest" 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/store" "github.com/tendermint/tendermint/types" ) diff --git a/internal/consensus/replay_file.go b/internal/consensus/replay_file.go index 47ed61874..d009533ba 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/proxy" sm "github.com/tendermint/tendermint/internal/state" + "github.com/tendermint/tendermint/internal/store" "github.com/tendermint/tendermint/libs/log" tmos "github.com/tendermint/tendermint/libs/os" tmpubsub "github.com/tendermint/tendermint/libs/pubsub" - "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" ) diff --git a/internal/consensus/replay_test.go b/internal/consensus/replay_test.go index 248cf6da3..97017985d 100644 --- a/internal/consensus/replay_test.go +++ b/internal/consensus/replay_test.go @@ -29,13 +29,13 @@ import ( "github.com/tendermint/tendermint/internal/proxy" 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" tmrand "github.com/tendermint/tendermint/libs/rand" "github.com/tendermint/tendermint/privval" tmstate "github.com/tendermint/tendermint/proto/tendermint/state" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" ) diff --git a/internal/consensus/wal_generator.go b/internal/consensus/wal_generator.go index ccc6685fc..7e31188fa 100644 --- a/internal/consensus/wal_generator.go +++ b/internal/consensus/wal_generator.go @@ -18,9 +18,9 @@ import ( "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/internal/proxy" sm "github.com/tendermint/tendermint/internal/state" + "github.com/tendermint/tendermint/internal/store" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/privval" - "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" ) diff --git a/internal/evidence/pool_test.go b/internal/evidence/pool_test.go index 5be2ec318..f38c09e02 100644 --- a/internal/evidence/pool_test.go +++ b/internal/evidence/pool_test.go @@ -16,9 +16,9 @@ import ( sm "github.com/tendermint/tendermint/internal/state" smmocks "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/internal/test/factory" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" "github.com/tendermint/tendermint/version" ) diff --git a/internal/inspect/inspect.go b/internal/inspect/inspect.go index c48776d3c..90e615341 100644 --- a/internal/inspect/inspect.go +++ b/internal/inspect/inspect.go @@ -12,9 +12,9 @@ import ( "github.com/tendermint/tendermint/internal/state" "github.com/tendermint/tendermint/internal/state/indexer" "github.com/tendermint/tendermint/internal/state/indexer/sink" + "github.com/tendermint/tendermint/internal/store" "github.com/tendermint/tendermint/libs/log" tmstrings "github.com/tendermint/tendermint/libs/strings" - "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" "golang.org/x/sync/errgroup" diff --git a/internal/state/execution_test.go b/internal/state/execution_test.go index d777d1699..8eff0430d 100644 --- a/internal/state/execution_test.go +++ b/internal/state/execution_test.go @@ -21,9 +21,9 @@ import ( 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" tmtime "github.com/tendermint/tendermint/libs/time" - "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" "github.com/tendermint/tendermint/version" ) diff --git a/internal/state/validation_test.go b/internal/state/validation_test.go index d2427f35a..08c54f139 100644 --- a/internal/state/validation_test.go +++ b/internal/state/validation_test.go @@ -17,11 +17,11 @@ import ( sm "github.com/tendermint/tendermint/internal/state" "github.com/tendermint/tendermint/internal/state/mocks" statefactory "github.com/tendermint/tendermint/internal/state/test/factory" + "github.com/tendermint/tendermint/internal/store" testfactory "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" tmtime "github.com/tendermint/tendermint/libs/time" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" ) diff --git a/internal/statesync/reactor.go b/internal/statesync/reactor.go index 196ac1a9d..931e2e7fc 100644 --- a/internal/statesync/reactor.go +++ b/internal/statesync/reactor.go @@ -16,12 +16,12 @@ import ( "github.com/tendermint/tendermint/internal/p2p" "github.com/tendermint/tendermint/internal/proxy" sm "github.com/tendermint/tendermint/internal/state" + "github.com/tendermint/tendermint/internal/store" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" "github.com/tendermint/tendermint/light" "github.com/tendermint/tendermint/light/provider" ssproto "github.com/tendermint/tendermint/proto/tendermint/statesync" - "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" ) diff --git a/internal/statesync/reactor_test.go b/internal/statesync/reactor_test.go index a0312428c..98ee9d26e 100644 --- a/internal/statesync/reactor_test.go +++ b/internal/statesync/reactor_test.go @@ -20,12 +20,12 @@ import ( proxymocks "github.com/tendermint/tendermint/internal/proxy/mocks" smmocks "github.com/tendermint/tendermint/internal/state/mocks" "github.com/tendermint/tendermint/internal/statesync/mocks" + "github.com/tendermint/tendermint/internal/store" "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/light/provider" ssproto "github.com/tendermint/tendermint/proto/tendermint/statesync" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" ) diff --git a/store/store.go b/internal/store/store.go similarity index 100% rename from store/store.go rename to internal/store/store.go diff --git a/store/store_test.go b/internal/store/store_test.go similarity index 100% rename from store/store_test.go rename to internal/store/store_test.go diff --git a/node/node.go b/node/node.go index 4e44a5678..fc43aace4 100644 --- a/node/node.go +++ b/node/node.go @@ -24,6 +24,7 @@ import ( rpccore "github.com/tendermint/tendermint/internal/rpc/core" sm "github.com/tendermint/tendermint/internal/state" "github.com/tendermint/tendermint/internal/statesync" + "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" @@ -34,7 +35,6 @@ import ( tmgrpc "github.com/tendermint/tendermint/privval/grpc" grpccore "github.com/tendermint/tendermint/rpc/grpc" rpcserver "github.com/tendermint/tendermint/rpc/jsonrpc/server" - "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" _ "net/http/pprof" // nolint: gosec // securely exposed on separate, optional port diff --git a/node/node_test.go b/node/node_test.go index a940fef54..30e7a8f13 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -27,12 +27,12 @@ import ( "github.com/tendermint/tendermint/internal/proxy" 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" tmrand "github.com/tendermint/tendermint/libs/rand" tmtime "github.com/tendermint/tendermint/libs/time" "github.com/tendermint/tendermint/privval" - "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" ) diff --git a/node/setup.go b/node/setup.go index 63fb4c739..3f305125d 100644 --- a/node/setup.go +++ b/node/setup.go @@ -29,11 +29,11 @@ import ( "github.com/tendermint/tendermint/internal/state/indexer" "github.com/tendermint/tendermint/internal/state/indexer/sink" "github.com/tendermint/tendermint/internal/statesync" + "github.com/tendermint/tendermint/internal/store" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" tmstrings "github.com/tendermint/tendermint/libs/strings" protop2p "github.com/tendermint/tendermint/proto/tendermint/p2p" - "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" "github.com/tendermint/tendermint/version"