diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index bb527dd5e..b094fc28e 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -38,15 +38,16 @@ Friendly reminder: We have a [bug bounty program](https://hackerone.com/tendermi - [store] \#5848 Remove block store state in favor of using the db iterators directly (@cmwaters) - [state] \#5864 Use an iterator when pruning state (@cmwaters) - [types] \#6023 Remove `tm2pb.Header`, `tm2pb.BlockID`, `tm2pb.PartSetHeader` and `tm2pb.NewValidatorUpdate`. - - Each of the above types has a `ToProto` and `FromProto` method or function which replaced this logic. + - Each of the above types has a `ToProto` and `FromProto` method or function which replaced this logic. - [light] \#6054 Move `MaxRetryAttempt` option from client to provider. - - `NewWithOptions` now sets the max retry attempts and timeouts (@cmwaters) + - `NewWithOptions` now sets the max retry attempts and timeouts (@cmwaters) - [all] \#6077 Change spelling from British English to American (@cmwaters) - - Rename "Subscription.Cancelled()" to "Subscription.Canceled()" in libs/pubsub - - Rename "behaviour" pkg to "behavior" and internalized it in blockchain v2 + - Rename "Subscription.Cancelled()" to "Subscription.Canceled()" in libs/pubsub + - Rename "behaviour" pkg to "behavior" and internalized it in blockchain v2 - [rpc/client/http] \#6176 Remove `endpoint` arg from `New`, `NewWithTimeout` and `NewWithClient` (@melekes) - [rpc/client/http] \#6176 Unexpose `WSEvents` (@melekes) - [rpc/jsonrpc/client/ws_client] \#6176 `NewWS` no longer accepts options (use `NewWSWithOptions` and `OnReconnect` funcs to configure the client) (@melekes) + - [internal/libs] \#6366 Move `autofile`, `clist`,`fail`,`flowrate`, `protoio`, `sync`, `tempfile`, `test` and `timer` lib packages to an internal folder - [libs/rand] \#6364 Removed most of libs/rand in favour of standard lib's `math/rand` (@liamsi) - Blockchain Protocol diff --git a/abci/client/client.go b/abci/client/client.go index bcba3bec3..387fc551a 100644 --- a/abci/client/client.go +++ b/abci/client/client.go @@ -6,8 +6,8 @@ import ( "sync" "github.com/tendermint/tendermint/abci/types" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" ) const ( diff --git a/abci/client/grpc_client.go b/abci/client/grpc_client.go index 18d9cb168..31bd6fae1 100644 --- a/abci/client/grpc_client.go +++ b/abci/client/grpc_client.go @@ -10,9 +10,9 @@ import ( "google.golang.org/grpc" "github.com/tendermint/tendermint/abci/types" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" tmnet "github.com/tendermint/tendermint/libs/net" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" ) // A gRPC client. diff --git a/abci/client/local_client.go b/abci/client/local_client.go index d25a98b4d..69457b5b0 100644 --- a/abci/client/local_client.go +++ b/abci/client/local_client.go @@ -4,8 +4,8 @@ import ( "context" types "github.com/tendermint/tendermint/abci/types" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" ) // NOTE: use defer to unlock mutex because Application might panic (e.g., in diff --git a/abci/client/socket_client.go b/abci/client/socket_client.go index 3e4034902..3fef8540d 100644 --- a/abci/client/socket_client.go +++ b/abci/client/socket_client.go @@ -12,10 +12,10 @@ import ( "time" "github.com/tendermint/tendermint/abci/types" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" + "github.com/tendermint/tendermint/internal/libs/timer" tmnet "github.com/tendermint/tendermint/libs/net" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" - "github.com/tendermint/tendermint/libs/timer" ) const ( diff --git a/abci/server/socket_server.go b/abci/server/socket_server.go index cf3663d2d..543b444b1 100644 --- a/abci/server/socket_server.go +++ b/abci/server/socket_server.go @@ -9,10 +9,10 @@ import ( "runtime" "github.com/tendermint/tendermint/abci/types" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" tmlog "github.com/tendermint/tendermint/libs/log" tmnet "github.com/tendermint/tendermint/libs/net" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" ) // var maxNumberConnections = 2 diff --git a/abci/types/messages.go b/abci/types/messages.go index cced13c1d..e0605c4e5 100644 --- a/abci/types/messages.go +++ b/abci/types/messages.go @@ -4,7 +4,7 @@ import ( "io" "github.com/gogo/protobuf/proto" - "github.com/tendermint/tendermint/libs/protoio" + "github.com/tendermint/tendermint/internal/libs/protoio" ) const ( diff --git a/blockchain/v0/pool.go b/blockchain/v0/pool.go index bbb5bbf80..829c4d720 100644 --- a/blockchain/v0/pool.go +++ b/blockchain/v0/pool.go @@ -7,10 +7,10 @@ import ( "sync/atomic" "time" - flow "github.com/tendermint/tendermint/libs/flowrate" + flow "github.com/tendermint/tendermint/internal/libs/flowrate" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/types" ) diff --git a/blockchain/v2/internal/behavior/reporter.go b/blockchain/v2/internal/behavior/reporter.go index aba61f596..8b92bd1be 100644 --- a/blockchain/v2/internal/behavior/reporter.go +++ b/blockchain/v2/internal/behavior/reporter.go @@ -3,7 +3,7 @@ package behavior import ( "errors" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/p2p" ) diff --git a/blockchain/v2/reactor.go b/blockchain/v2/reactor.go index 42b94a762..394ba2b5b 100644 --- a/blockchain/v2/reactor.go +++ b/blockchain/v2/reactor.go @@ -9,8 +9,8 @@ import ( bc "github.com/tendermint/tendermint/blockchain" "github.com/tendermint/tendermint/blockchain/v2/internal/behavior" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/log" - tmsync "github.com/tendermint/tendermint/libs/sync" "github.com/tendermint/tendermint/p2p" bcproto "github.com/tendermint/tendermint/proto/tendermint/blockchain" "github.com/tendermint/tendermint/state" diff --git a/consensus/byzantine_test.go b/consensus/byzantine_test.go index 1aa1d6a43..996867a63 100644 --- a/consensus/byzantine_test.go +++ b/consensus/byzantine_test.go @@ -13,9 +13,9 @@ import ( abcicli "github.com/tendermint/tendermint/abci/client" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/evidence" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" - tmsync "github.com/tendermint/tendermint/libs/sync" mempl "github.com/tendermint/tendermint/mempool" "github.com/tendermint/tendermint/p2p" tmcons "github.com/tendermint/tendermint/proto/tendermint/consensus" diff --git a/consensus/common_test.go b/consensus/common_test.go index e0aac0695..eb04f109d 100644 --- a/consensus/common_test.go +++ b/consensus/common_test.go @@ -25,12 +25,12 @@ import ( abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" cstypes "github.com/tendermint/tendermint/consensus/types" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "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" - tmsync "github.com/tendermint/tendermint/libs/sync" mempl "github.com/tendermint/tendermint/mempool" "github.com/tendermint/tendermint/privval" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" diff --git a/consensus/peer_state.go b/consensus/peer_state.go index 1fb16d1be..fd720d815 100644 --- a/consensus/peer_state.go +++ b/consensus/peer_state.go @@ -7,10 +7,10 @@ import ( "time" cstypes "github.com/tendermint/tendermint/consensus/types" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/bits" tmjson "github.com/tendermint/tendermint/libs/json" "github.com/tendermint/tendermint/libs/log" - tmsync "github.com/tendermint/tendermint/libs/sync" "github.com/tendermint/tendermint/p2p" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" diff --git a/consensus/reactor.go b/consensus/reactor.go index de02a682a..834fff5bc 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -5,11 +5,11 @@ import ( "time" cstypes "github.com/tendermint/tendermint/consensus/types" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/bits" tmevents "github.com/tendermint/tendermint/libs/events" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" "github.com/tendermint/tendermint/p2p" tmcons "github.com/tendermint/tendermint/proto/tendermint/consensus" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" diff --git a/consensus/reactor_test.go b/consensus/reactor_test.go index cc4c2feb3..d2ae9e45b 100644 --- a/consensus/reactor_test.go +++ b/consensus/reactor_test.go @@ -18,9 +18,9 @@ import ( abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" cryptoenc "github.com/tendermint/tendermint/crypto/encoding" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" - tmsync "github.com/tendermint/tendermint/libs/sync" mempl "github.com/tendermint/tendermint/mempool" "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/p2p/p2ptest" diff --git a/consensus/replay_stubs.go b/consensus/replay_stubs.go index 08974a67e..e212234a7 100644 --- a/consensus/replay_stubs.go +++ b/consensus/replay_stubs.go @@ -2,7 +2,7 @@ package consensus import ( abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/clist" + "github.com/tendermint/tendermint/internal/libs/clist" mempl "github.com/tendermint/tendermint/mempool" tmstate "github.com/tendermint/tendermint/proto/tendermint/state" "github.com/tendermint/tendermint/proxy" diff --git a/consensus/state.go b/consensus/state.go index a4ab2122b..14d9ba945 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -15,14 +15,14 @@ import ( cfg "github.com/tendermint/tendermint/config" cstypes "github.com/tendermint/tendermint/consensus/types" "github.com/tendermint/tendermint/crypto" + "github.com/tendermint/tendermint/internal/libs/fail" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" tmevents "github.com/tendermint/tendermint/libs/events" - "github.com/tendermint/tendermint/libs/fail" tmjson "github.com/tendermint/tendermint/libs/json" "github.com/tendermint/tendermint/libs/log" tmmath "github.com/tendermint/tendermint/libs/math" tmos "github.com/tendermint/tendermint/libs/os" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" "github.com/tendermint/tendermint/p2p" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" sm "github.com/tendermint/tendermint/state" diff --git a/consensus/wal.go b/consensus/wal.go index 80f5e6b07..944e26730 100644 --- a/consensus/wal.go +++ b/consensus/wal.go @@ -11,7 +11,7 @@ import ( "github.com/gogo/protobuf/proto" - auto "github.com/tendermint/tendermint/libs/autofile" + auto "github.com/tendermint/tendermint/internal/libs/autofile" tmjson "github.com/tendermint/tendermint/libs/json" "github.com/tendermint/tendermint/libs/log" tmos "github.com/tendermint/tendermint/libs/os" diff --git a/consensus/wal_test.go b/consensus/wal_test.go index a64ecc9a5..b5538f609 100644 --- a/consensus/wal_test.go +++ b/consensus/wal_test.go @@ -14,7 +14,7 @@ import ( "github.com/tendermint/tendermint/consensus/types" "github.com/tendermint/tendermint/crypto/merkle" - "github.com/tendermint/tendermint/libs/autofile" + "github.com/tendermint/tendermint/internal/libs/autofile" "github.com/tendermint/tendermint/libs/log" tmtypes "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" diff --git a/crypto/merkle/tree_test.go b/crypto/merkle/tree_test.go index bdf469836..641c46b76 100644 --- a/crypto/merkle/tree_test.go +++ b/crypto/merkle/tree_test.go @@ -7,10 +7,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - tmrand "github.com/tendermint/tendermint/libs/rand" - . "github.com/tendermint/tendermint/libs/test" - "github.com/tendermint/tendermint/crypto/tmhash" + ctest "github.com/tendermint/tendermint/internal/libs/test" + tmrand "github.com/tendermint/tendermint/libs/rand" ) type testItem []byte @@ -92,11 +91,11 @@ func TestProof(t *testing.T) { proof.Aunts = origAunts // Mutating the itemHash should make it fail. - err = proof.Verify(rootHash, MutateByteSlice(item)) + err = proof.Verify(rootHash, ctest.MutateByteSlice(item)) require.Error(t, err, "Expected verification to fail for mutated leaf hash") // Mutating the rootHash should make it fail. - err = proof.Verify(MutateByteSlice(rootHash), item) + err = proof.Verify(ctest.MutateByteSlice(rootHash), item) require.Error(t, err, "Expected verification to fail for mutated root hash") } } diff --git a/evidence/pool.go b/evidence/pool.go index 71d282436..8ca97fd17 100644 --- a/evidence/pool.go +++ b/evidence/pool.go @@ -13,7 +13,7 @@ import ( "github.com/google/orderedcode" dbm "github.com/tendermint/tm-db" - clist "github.com/tendermint/tendermint/libs/clist" + clist "github.com/tendermint/tendermint/internal/libs/clist" "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" sm "github.com/tendermint/tendermint/state" diff --git a/evidence/reactor.go b/evidence/reactor.go index 867b729c0..4a0e2a8c8 100644 --- a/evidence/reactor.go +++ b/evidence/reactor.go @@ -5,10 +5,10 @@ import ( "sync" "time" - clist "github.com/tendermint/tendermint/libs/clist" + clist "github.com/tendermint/tendermint/internal/libs/clist" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" "github.com/tendermint/tendermint/p2p" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" diff --git a/libs/autofile/README.md b/internal/libs/autofile/README.md similarity index 100% rename from libs/autofile/README.md rename to internal/libs/autofile/README.md diff --git a/libs/autofile/autofile.go b/internal/libs/autofile/autofile.go similarity index 100% rename from libs/autofile/autofile.go rename to internal/libs/autofile/autofile.go diff --git a/libs/autofile/autofile_test.go b/internal/libs/autofile/autofile_test.go similarity index 100% rename from libs/autofile/autofile_test.go rename to internal/libs/autofile/autofile_test.go diff --git a/libs/autofile/cmd/logjack.go b/internal/libs/autofile/cmd/logjack.go similarity index 98% rename from libs/autofile/cmd/logjack.go rename to internal/libs/autofile/cmd/logjack.go index 46eaf71ee..1aa8b6a11 100644 --- a/libs/autofile/cmd/logjack.go +++ b/internal/libs/autofile/cmd/logjack.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - auto "github.com/tendermint/tendermint/libs/autofile" + auto "github.com/tendermint/tendermint/internal/libs/autofile" tmos "github.com/tendermint/tendermint/libs/os" ) diff --git a/libs/autofile/group.go b/internal/libs/autofile/group.go similarity index 100% rename from libs/autofile/group.go rename to internal/libs/autofile/group.go diff --git a/libs/autofile/group_test.go b/internal/libs/autofile/group_test.go similarity index 100% rename from libs/autofile/group_test.go rename to internal/libs/autofile/group_test.go diff --git a/libs/clist/bench_test.go b/internal/libs/clist/bench_test.go similarity index 100% rename from libs/clist/bench_test.go rename to internal/libs/clist/bench_test.go diff --git a/libs/clist/clist.go b/internal/libs/clist/clist.go similarity index 99% rename from libs/clist/clist.go rename to internal/libs/clist/clist.go index a32098774..6cf515706 100644 --- a/libs/clist/clist.go +++ b/internal/libs/clist/clist.go @@ -15,7 +15,7 @@ import ( "fmt" "sync" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" ) // MaxLength is the max allowed number of elements a linked list is diff --git a/libs/clist/clist_test.go b/internal/libs/clist/clist_test.go similarity index 100% rename from libs/clist/clist_test.go rename to internal/libs/clist/clist_test.go diff --git a/libs/fail/fail.go b/internal/libs/fail/fail.go similarity index 100% rename from libs/fail/fail.go rename to internal/libs/fail/fail.go diff --git a/libs/flowrate/README.md b/internal/libs/flowrate/README.md similarity index 100% rename from libs/flowrate/README.md rename to internal/libs/flowrate/README.md diff --git a/libs/flowrate/flowrate.go b/internal/libs/flowrate/flowrate.go similarity index 99% rename from libs/flowrate/flowrate.go rename to internal/libs/flowrate/flowrate.go index c7ba93282..522c46cc7 100644 --- a/libs/flowrate/flowrate.go +++ b/internal/libs/flowrate/flowrate.go @@ -10,7 +10,7 @@ import ( "math" "time" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" ) // Monitor monitors and limits the transfer rate of a data stream. diff --git a/libs/flowrate/io.go b/internal/libs/flowrate/io.go similarity index 100% rename from libs/flowrate/io.go rename to internal/libs/flowrate/io.go diff --git a/libs/flowrate/io_test.go b/internal/libs/flowrate/io_test.go similarity index 100% rename from libs/flowrate/io_test.go rename to internal/libs/flowrate/io_test.go diff --git a/libs/flowrate/util.go b/internal/libs/flowrate/util.go similarity index 100% rename from libs/flowrate/util.go rename to internal/libs/flowrate/util.go diff --git a/libs/protoio/io.go b/internal/libs/protoio/io.go similarity index 100% rename from libs/protoio/io.go rename to internal/libs/protoio/io.go diff --git a/libs/protoio/io_test.go b/internal/libs/protoio/io_test.go similarity index 98% rename from libs/protoio/io_test.go rename to internal/libs/protoio/io_test.go index e6e51d051..2f1437c68 100644 --- a/libs/protoio/io_test.go +++ b/internal/libs/protoio/io_test.go @@ -41,7 +41,7 @@ import ( "github.com/gogo/protobuf/test" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/libs/protoio" + "github.com/tendermint/tendermint/internal/libs/protoio" ) func iotest(writer protoio.WriteCloser, reader protoio.ReadCloser) error { diff --git a/libs/protoio/reader.go b/internal/libs/protoio/reader.go similarity index 100% rename from libs/protoio/reader.go rename to internal/libs/protoio/reader.go diff --git a/libs/protoio/writer.go b/internal/libs/protoio/writer.go similarity index 100% rename from libs/protoio/writer.go rename to internal/libs/protoio/writer.go diff --git a/libs/sync/closer.go b/internal/libs/sync/closer.go similarity index 100% rename from libs/sync/closer.go rename to internal/libs/sync/closer.go diff --git a/libs/sync/closer_test.go b/internal/libs/sync/closer_test.go similarity index 85% rename from libs/sync/closer_test.go rename to internal/libs/sync/closer_test.go index 40f7a12e3..aea915215 100644 --- a/libs/sync/closer_test.go +++ b/internal/libs/sync/closer_test.go @@ -5,7 +5,7 @@ import ( "time" "github.com/stretchr/testify/require" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" ) func TestCloser(t *testing.T) { diff --git a/libs/sync/deadlock.go b/internal/libs/sync/deadlock.go similarity index 100% rename from libs/sync/deadlock.go rename to internal/libs/sync/deadlock.go diff --git a/libs/sync/sync.go b/internal/libs/sync/sync.go similarity index 100% rename from libs/sync/sync.go rename to internal/libs/sync/sync.go diff --git a/libs/sync/waker.go b/internal/libs/sync/waker.go similarity index 100% rename from libs/sync/waker.go rename to internal/libs/sync/waker.go diff --git a/libs/sync/waker_test.go b/internal/libs/sync/waker_test.go similarity index 92% rename from libs/sync/waker_test.go rename to internal/libs/sync/waker_test.go index dfd337e0e..b63dc5eb1 100644 --- a/libs/sync/waker_test.go +++ b/internal/libs/sync/waker_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" ) func TestWaker(t *testing.T) { diff --git a/libs/tempfile/tempfile.go b/internal/libs/tempfile/tempfile.go similarity index 98% rename from libs/tempfile/tempfile.go rename to internal/libs/tempfile/tempfile.go index 922ed5722..0c594bb20 100644 --- a/libs/tempfile/tempfile.go +++ b/internal/libs/tempfile/tempfile.go @@ -9,7 +9,7 @@ import ( "strings" "time" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" ) const ( diff --git a/libs/tempfile/tempfile_test.go b/internal/libs/tempfile/tempfile_test.go similarity index 100% rename from libs/tempfile/tempfile_test.go rename to internal/libs/tempfile/tempfile_test.go diff --git a/libs/test/mutate.go b/internal/libs/test/mutate.go similarity index 100% rename from libs/test/mutate.go rename to internal/libs/test/mutate.go diff --git a/libs/timer/throttle_timer.go b/internal/libs/timer/throttle_timer.go similarity index 95% rename from libs/timer/throttle_timer.go rename to internal/libs/timer/throttle_timer.go index 7f5660c05..3f21e3cc0 100644 --- a/libs/timer/throttle_timer.go +++ b/internal/libs/timer/throttle_timer.go @@ -3,7 +3,7 @@ package timer import ( "time" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" ) /* diff --git a/libs/timer/throttle_timer_test.go b/internal/libs/timer/throttle_timer_test.go similarity index 95% rename from libs/timer/throttle_timer_test.go rename to internal/libs/timer/throttle_timer_test.go index af990fc6d..a56dcadfd 100644 --- a/libs/timer/throttle_timer_test.go +++ b/internal/libs/timer/throttle_timer_test.go @@ -8,7 +8,7 @@ import ( asrt "github.com/stretchr/testify/assert" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" ) type thCounter struct { diff --git a/libs/cmap/cmap.go b/libs/cmap/cmap.go index d16631d31..539870363 100644 --- a/libs/cmap/cmap.go +++ b/libs/cmap/cmap.go @@ -1,7 +1,7 @@ package cmap import ( - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" ) // CMap is a goroutine-safe map diff --git a/libs/events/events.go b/libs/events/events.go index ffc06cc02..21bfce3e5 100644 --- a/libs/events/events.go +++ b/libs/events/events.go @@ -4,8 +4,8 @@ package events import ( "fmt" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" ) // ErrListenerWasRemoved is returned by AddEvent if the listener was removed. diff --git a/libs/json/structs.go b/libs/json/structs.go index 2037cdad9..b9521114a 100644 --- a/libs/json/structs.go +++ b/libs/json/structs.go @@ -6,7 +6,7 @@ import ( "strings" "unicode" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" ) var ( diff --git a/libs/json/types.go b/libs/json/types.go index 13f20d2bc..9f21e81eb 100644 --- a/libs/json/types.go +++ b/libs/json/types.go @@ -5,7 +5,7 @@ import ( "fmt" "reflect" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" ) var ( diff --git a/libs/pubsub/pubsub.go b/libs/pubsub/pubsub.go index b5ec56217..aa030f07d 100644 --- a/libs/pubsub/pubsub.go +++ b/libs/pubsub/pubsub.go @@ -39,8 +39,8 @@ import ( "errors" "fmt" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" ) type operation int diff --git a/libs/pubsub/subscription.go b/libs/pubsub/subscription.go index f9c80e373..a5f9f398e 100644 --- a/libs/pubsub/subscription.go +++ b/libs/pubsub/subscription.go @@ -3,7 +3,7 @@ package pubsub import ( "errors" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" ) var ( diff --git a/light/client.go b/light/client.go index 8765468bf..efdf41b02 100644 --- a/light/client.go +++ b/light/client.go @@ -9,9 +9,9 @@ import ( "sync" "time" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/log" tmmath "github.com/tendermint/tendermint/libs/math" - tmsync "github.com/tendermint/tendermint/libs/sync" "github.com/tendermint/tendermint/light/provider" "github.com/tendermint/tendermint/light/store" "github.com/tendermint/tendermint/types" diff --git a/light/store/db/db.go b/light/store/db/db.go index ad230632a..acfda1f79 100644 --- a/light/store/db/db.go +++ b/light/store/db/db.go @@ -7,7 +7,7 @@ import ( "github.com/google/orderedcode" dbm "github.com/tendermint/tm-db" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/light/store" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" diff --git a/mempool/clist_mempool.go b/mempool/clist_mempool.go index 363b29fa3..e59ce72ca 100644 --- a/mempool/clist_mempool.go +++ b/mempool/clist_mempool.go @@ -11,10 +11,10 @@ import ( abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" - "github.com/tendermint/tendermint/libs/clist" + "github.com/tendermint/tendermint/internal/libs/clist" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/log" tmmath "github.com/tendermint/tendermint/libs/math" - tmsync "github.com/tendermint/tendermint/libs/sync" "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/proxy" "github.com/tendermint/tendermint/types" diff --git a/mempool/ids.go b/mempool/ids.go index 2c30ef3d0..286921c44 100644 --- a/mempool/ids.go +++ b/mempool/ids.go @@ -3,7 +3,7 @@ package mempool import ( "fmt" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/p2p" ) diff --git a/mempool/mock/mempool.go b/mempool/mock/mempool.go index be690efaa..2b780b997 100644 --- a/mempool/mock/mempool.go +++ b/mempool/mock/mempool.go @@ -2,7 +2,7 @@ package mock import ( abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/clist" + "github.com/tendermint/tendermint/internal/libs/clist" mempl "github.com/tendermint/tendermint/mempool" "github.com/tendermint/tendermint/types" ) diff --git a/mempool/reactor.go b/mempool/reactor.go index dc35ac927..005bb390e 100644 --- a/mempool/reactor.go +++ b/mempool/reactor.go @@ -8,10 +8,10 @@ import ( "time" cfg "github.com/tendermint/tendermint/config" - "github.com/tendermint/tendermint/libs/clist" + "github.com/tendermint/tendermint/internal/libs/clist" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" "github.com/tendermint/tendermint/p2p" protomem "github.com/tendermint/tendermint/proto/tendermint/mempool" "github.com/tendermint/tendermint/types" diff --git a/p2p/conn/connection.go b/p2p/conn/connection.go index 8062805dc..8a0629528 100644 --- a/p2p/conn/connection.go +++ b/p2p/conn/connection.go @@ -14,13 +14,13 @@ import ( "github.com/gogo/protobuf/proto" - flow "github.com/tendermint/tendermint/libs/flowrate" + flow "github.com/tendermint/tendermint/internal/libs/flowrate" + "github.com/tendermint/tendermint/internal/libs/protoio" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" + "github.com/tendermint/tendermint/internal/libs/timer" "github.com/tendermint/tendermint/libs/log" tmmath "github.com/tendermint/tendermint/libs/math" - "github.com/tendermint/tendermint/libs/protoio" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" - "github.com/tendermint/tendermint/libs/timer" tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" ) diff --git a/p2p/conn/connection_test.go b/p2p/conn/connection_test.go index dec59d330..bfbcc69ce 100644 --- a/p2p/conn/connection_test.go +++ b/p2p/conn/connection_test.go @@ -11,8 +11,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/internal/libs/protoio" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/libs/protoio" tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" "github.com/tendermint/tendermint/proto/tendermint/types" ) diff --git a/p2p/conn/evil_secret_connection_test.go b/p2p/conn/evil_secret_connection_test.go index 43e4d8743..ff12270c0 100644 --- a/p2p/conn/evil_secret_connection_test.go +++ b/p2p/conn/evil_secret_connection_test.go @@ -14,7 +14,7 @@ import ( "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" cryptoenc "github.com/tendermint/tendermint/crypto/encoding" - "github.com/tendermint/tendermint/libs/protoio" + "github.com/tendermint/tendermint/internal/libs/protoio" tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" ) diff --git a/p2p/conn/secret_connection.go b/p2p/conn/secret_connection.go index 6b24a28fc..c1017db1a 100644 --- a/p2p/conn/secret_connection.go +++ b/p2p/conn/secret_connection.go @@ -24,9 +24,9 @@ import ( "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" cryptoenc "github.com/tendermint/tendermint/crypto/encoding" + "github.com/tendermint/tendermint/internal/libs/protoio" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/async" - "github.com/tendermint/tendermint/libs/protoio" - tmsync "github.com/tendermint/tendermint/libs/sync" tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" ) diff --git a/p2p/conn_set.go b/p2p/conn_set.go index 376510d72..987d9f968 100644 --- a/p2p/conn_set.go +++ b/p2p/conn_set.go @@ -3,7 +3,7 @@ package p2p import ( "net" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" ) // ConnSet is a lookup table for connections and all their ips. diff --git a/p2p/peer_set.go b/p2p/peer_set.go index d2c8aedab..f899e8049 100644 --- a/p2p/peer_set.go +++ b/p2p/peer_set.go @@ -3,7 +3,7 @@ package p2p import ( "net" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" ) // IPeerSet has a (immutable) subset of the methods of PeerSet. diff --git a/p2p/peermanager.go b/p2p/peermanager.go index cf50e327b..ce731a440 100644 --- a/p2p/peermanager.go +++ b/p2p/peermanager.go @@ -14,7 +14,7 @@ import ( "github.com/google/orderedcode" dbm "github.com/tendermint/tm-db" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" p2pproto "github.com/tendermint/tendermint/proto/tendermint/p2p" ) diff --git a/p2p/pex/addrbook.go b/p2p/pex/addrbook.go index fa4d0094f..831848915 100644 --- a/p2p/pex/addrbook.go +++ b/p2p/pex/addrbook.go @@ -16,10 +16,10 @@ import ( "github.com/minio/highwayhash" "github.com/tendermint/tendermint/crypto" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" tmmath "github.com/tendermint/tendermint/libs/math" tmrand "github.com/tendermint/tendermint/libs/rand" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" "github.com/tendermint/tendermint/p2p" ) diff --git a/p2p/pex/file.go b/p2p/pex/file.go index 6f912bc70..ce65f7d4d 100644 --- a/p2p/pex/file.go +++ b/p2p/pex/file.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - "github.com/tendermint/tendermint/libs/tempfile" + "github.com/tendermint/tendermint/internal/libs/tempfile" ) /* Loading & Saving */ diff --git a/p2p/pqueue.go b/p2p/pqueue.go index ebb0ed92c..0e62c87d9 100644 --- a/p2p/pqueue.go +++ b/p2p/pqueue.go @@ -7,8 +7,8 @@ import ( "time" "github.com/gogo/protobuf/proto" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/log" - tmsync "github.com/tendermint/tendermint/libs/sync" ) // pqEnvelope defines a wrapper around an Envelope with priority to be inserted diff --git a/p2p/queue.go b/p2p/queue.go index 38e6b47b2..57c2722da 100644 --- a/p2p/queue.go +++ b/p2p/queue.go @@ -1,7 +1,7 @@ package p2p import ( - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" ) // queue does QoS scheduling for Envelopes, enqueueing and dequeueing according diff --git a/p2p/router_filter_test.go b/p2p/router_filter_test.go index 51c4947b4..4082dc928 100644 --- a/p2p/router_filter_test.go +++ b/p2p/router_filter_test.go @@ -8,8 +8,8 @@ import ( "time" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/libs/sync" ) func TestConnectionFiltering(t *testing.T) { diff --git a/p2p/router_test.go b/p2p/router_test.go index 86f5bde99..2e0d9bbb3 100644 --- a/p2p/router_test.go +++ b/p2p/router_test.go @@ -17,8 +17,8 @@ import ( dbm "github.com/tendermint/tm-db" "github.com/tendermint/tendermint/crypto" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/log" - tmsync "github.com/tendermint/tendermint/libs/sync" "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/p2p/mocks" "github.com/tendermint/tendermint/p2p/p2ptest" diff --git a/p2p/switch_test.go b/p2p/switch_test.go index 303d9d6f3..3a0d065c6 100644 --- a/p2p/switch_test.go +++ b/p2p/switch_test.go @@ -21,8 +21,8 @@ import ( "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/crypto/ed25519" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/log" - tmsync "github.com/tendermint/tendermint/libs/sync" "github.com/tendermint/tendermint/p2p/conn" ) diff --git a/p2p/transport_mconn.go b/p2p/transport_mconn.go index 5369a67e2..5295587e6 100644 --- a/p2p/transport_mconn.go +++ b/p2p/transport_mconn.go @@ -13,8 +13,8 @@ import ( "golang.org/x/net/netutil" "github.com/tendermint/tendermint/crypto" + "github.com/tendermint/tendermint/internal/libs/protoio" "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/libs/protoio" "github.com/tendermint/tendermint/p2p/conn" p2pproto "github.com/tendermint/tendermint/proto/tendermint/p2p" ) diff --git a/p2p/transport_memory.go b/p2p/transport_memory.go index 31d03a2bb..ea2131071 100644 --- a/p2p/transport_memory.go +++ b/p2p/transport_memory.go @@ -9,8 +9,8 @@ import ( "sync" "github.com/tendermint/tendermint/crypto" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/log" - tmsync "github.com/tendermint/tendermint/libs/sync" "github.com/tendermint/tendermint/p2p/conn" ) diff --git a/p2p/trust/metric.go b/p2p/trust/metric.go index dd2d75d43..aa0ff5298 100644 --- a/p2p/trust/metric.go +++ b/p2p/trust/metric.go @@ -7,8 +7,8 @@ import ( "math" "time" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" ) //--------------------------------------------------------------------------------------- diff --git a/p2p/trust/store.go b/p2p/trust/store.go index e7233c915..9f200b9dd 100644 --- a/p2p/trust/store.go +++ b/p2p/trust/store.go @@ -10,8 +10,8 @@ import ( dbm "github.com/tendermint/tm-db" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" ) const defaultStorePeriodicSaveInterval = 1 * time.Minute diff --git a/p2p/wdrr_queue.go b/p2p/wdrr_queue.go index 9d49e6404..6c8654044 100644 --- a/p2p/wdrr_queue.go +++ b/p2p/wdrr_queue.go @@ -6,8 +6,8 @@ import ( "strconv" "github.com/gogo/protobuf/proto" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/log" - tmsync "github.com/tendermint/tendermint/libs/sync" ) const defaultCapacity uint = 1048576 // 1MB diff --git a/p2p/wdrr_queue_test.go b/p2p/wdrr_queue_test.go index 0fe67a94b..d49c77e76 100644 --- a/p2p/wdrr_queue_test.go +++ b/p2p/wdrr_queue_test.go @@ -8,8 +8,8 @@ import ( gogotypes "github.com/gogo/protobuf/types" "github.com/stretchr/testify/require" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/log" - tmsync "github.com/tendermint/tendermint/libs/sync" ) type testMessage = gogotypes.StringValue diff --git a/privval/file.go b/privval/file.go index d20e9b94f..fdcfd1b30 100644 --- a/privval/file.go +++ b/privval/file.go @@ -13,11 +13,11 @@ import ( "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/secp256k1" + "github.com/tendermint/tendermint/internal/libs/protoio" + "github.com/tendermint/tendermint/internal/libs/tempfile" tmbytes "github.com/tendermint/tendermint/libs/bytes" tmjson "github.com/tendermint/tendermint/libs/json" tmos "github.com/tendermint/tendermint/libs/os" - "github.com/tendermint/tendermint/libs/protoio" - "github.com/tendermint/tendermint/libs/tempfile" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" diff --git a/privval/secret_connection.go b/privval/secret_connection.go index 4ba9f774a..99264de90 100644 --- a/privval/secret_connection.go +++ b/privval/secret_connection.go @@ -24,9 +24,9 @@ import ( "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" cryptoenc "github.com/tendermint/tendermint/crypto/encoding" + "github.com/tendermint/tendermint/internal/libs/protoio" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/async" - "github.com/tendermint/tendermint/libs/protoio" - tmsync "github.com/tendermint/tendermint/libs/sync" tmprivval "github.com/tendermint/tendermint/proto/tendermint/privval" ) diff --git a/privval/signer_endpoint.go b/privval/signer_endpoint.go index e1594438c..0d46ca692 100644 --- a/privval/signer_endpoint.go +++ b/privval/signer_endpoint.go @@ -5,9 +5,9 @@ import ( "net" "time" - "github.com/tendermint/tendermint/libs/protoio" + "github.com/tendermint/tendermint/internal/libs/protoio" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" privvalproto "github.com/tendermint/tendermint/proto/tendermint/privval" ) diff --git a/privval/signer_listener_endpoint.go b/privval/signer_listener_endpoint.go index fefa68317..16ffc5c98 100644 --- a/privval/signer_listener_endpoint.go +++ b/privval/signer_listener_endpoint.go @@ -5,9 +5,9 @@ import ( "net" "time" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" privvalproto "github.com/tendermint/tendermint/proto/tendermint/privval" ) diff --git a/privval/signer_server.go b/privval/signer_server.go index f6e150ca0..24bf67cc5 100644 --- a/privval/signer_server.go +++ b/privval/signer_server.go @@ -4,8 +4,8 @@ import ( "context" "io" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" privvalproto "github.com/tendermint/tendermint/proto/tendermint/privval" "github.com/tendermint/tendermint/types" ) diff --git a/proxy/client.go b/proxy/client.go index f57c603ca..2fa251940 100644 --- a/proxy/client.go +++ b/proxy/client.go @@ -8,7 +8,7 @@ import ( "github.com/tendermint/tendermint/abci/example/counter" "github.com/tendermint/tendermint/abci/example/kvstore" "github.com/tendermint/tendermint/abci/types" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" ) // ClientCreator creates new ABCI clients. diff --git a/rpc/client/http/ws.go b/rpc/client/http/ws.go index 54b75ee59..f9494bf19 100644 --- a/rpc/client/http/ws.go +++ b/rpc/client/http/ws.go @@ -7,10 +7,10 @@ import ( "strings" "time" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" tmjson "github.com/tendermint/tendermint/libs/json" tmpubsub "github.com/tendermint/tendermint/libs/pubsub" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" rpcclient "github.com/tendermint/tendermint/rpc/client" ctypes "github.com/tendermint/tendermint/rpc/core/types" jsonrpcclient "github.com/tendermint/tendermint/rpc/jsonrpc/client" diff --git a/rpc/jsonrpc/client/http_json_client.go b/rpc/jsonrpc/client/http_json_client.go index 295cdc24f..67cc79e6e 100644 --- a/rpc/jsonrpc/client/http_json_client.go +++ b/rpc/jsonrpc/client/http_json_client.go @@ -11,7 +11,7 @@ import ( "net/url" "strings" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" types "github.com/tendermint/tendermint/rpc/jsonrpc/types" ) diff --git a/rpc/jsonrpc/client/ws_client.go b/rpc/jsonrpc/client/ws_client.go index c93426110..f47186429 100644 --- a/rpc/jsonrpc/client/ws_client.go +++ b/rpc/jsonrpc/client/ws_client.go @@ -13,8 +13,8 @@ import ( "github.com/gorilla/websocket" metrics "github.com/rcrowley/go-metrics" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" types "github.com/tendermint/tendermint/rpc/jsonrpc/types" ) diff --git a/rpc/jsonrpc/client/ws_client_test.go b/rpc/jsonrpc/client/ws_client_test.go index 2e6403806..bb8c149f6 100644 --- a/rpc/jsonrpc/client/ws_client_test.go +++ b/rpc/jsonrpc/client/ws_client_test.go @@ -12,8 +12,8 @@ import ( "github.com/gorilla/websocket" "github.com/stretchr/testify/require" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/log" - tmsync "github.com/tendermint/tendermint/libs/sync" types "github.com/tendermint/tendermint/rpc/jsonrpc/types" ) diff --git a/state/execution.go b/state/execution.go index 3408e873a..437d027d0 100644 --- a/state/execution.go +++ b/state/execution.go @@ -8,7 +8,7 @@ import ( abci "github.com/tendermint/tendermint/abci/types" cryptoenc "github.com/tendermint/tendermint/crypto/encoding" - "github.com/tendermint/tendermint/libs/fail" + "github.com/tendermint/tendermint/internal/libs/fail" "github.com/tendermint/tendermint/libs/log" mempl "github.com/tendermint/tendermint/mempool" tmstate "github.com/tendermint/tendermint/proto/tendermint/state" diff --git a/statesync/chunks.go b/statesync/chunks.go index c53fca8ed..1e8e45ed3 100644 --- a/statesync/chunks.go +++ b/statesync/chunks.go @@ -9,7 +9,7 @@ import ( "strconv" "time" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/p2p" ) diff --git a/statesync/reactor.go b/statesync/reactor.go index 79da87c0f..898f83ccb 100644 --- a/statesync/reactor.go +++ b/statesync/reactor.go @@ -8,9 +8,9 @@ import ( "time" abci "github.com/tendermint/tendermint/abci/types" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/libs/service" - tmsync "github.com/tendermint/tendermint/libs/sync" "github.com/tendermint/tendermint/p2p" ssproto "github.com/tendermint/tendermint/proto/tendermint/statesync" "github.com/tendermint/tendermint/proxy" diff --git a/statesync/snapshots.go b/statesync/snapshots.go index 70e5bd78e..2ae6e7c20 100644 --- a/statesync/snapshots.go +++ b/statesync/snapshots.go @@ -9,7 +9,7 @@ import ( "strings" "time" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/p2p" ) diff --git a/statesync/stateprovider.go b/statesync/stateprovider.go index e5a12b97f..99eef2bbe 100644 --- a/statesync/stateprovider.go +++ b/statesync/stateprovider.go @@ -8,8 +8,8 @@ import ( dbm "github.com/tendermint/tm-db" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/log" - tmsync "github.com/tendermint/tendermint/libs/sync" "github.com/tendermint/tendermint/light" lightprovider "github.com/tendermint/tendermint/light/provider" lighthttp "github.com/tendermint/tendermint/light/provider/http" diff --git a/statesync/syncer.go b/statesync/syncer.go index c5ab44f89..298c20a7c 100644 --- a/statesync/syncer.go +++ b/statesync/syncer.go @@ -8,8 +8,8 @@ import ( "time" abci "github.com/tendermint/tendermint/abci/types" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/log" - tmsync "github.com/tendermint/tendermint/libs/sync" "github.com/tendermint/tendermint/p2p" ssproto "github.com/tendermint/tendermint/proto/tendermint/statesync" "github.com/tendermint/tendermint/proxy" diff --git a/statesync/syncer_test.go b/statesync/syncer_test.go index 876d6adcb..ad8100123 100644 --- a/statesync/syncer_test.go +++ b/statesync/syncer_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" - tmsync "github.com/tendermint/tendermint/libs/sync" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/p2p" ssproto "github.com/tendermint/tendermint/proto/tendermint/statesync" "github.com/tendermint/tendermint/proxy" diff --git a/types/block.go b/types/block.go index b48d13653..d1790251e 100644 --- a/types/block.go +++ b/types/block.go @@ -13,10 +13,10 @@ import ( "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/merkle" "github.com/tendermint/tendermint/crypto/tmhash" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/bits" tmbytes "github.com/tendermint/tendermint/libs/bytes" tmmath "github.com/tendermint/tendermint/libs/math" - tmsync "github.com/tendermint/tendermint/libs/sync" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/tendermint/tendermint/version" ) diff --git a/types/part_set.go b/types/part_set.go index 5e76b57fa..3a691083f 100644 --- a/types/part_set.go +++ b/types/part_set.go @@ -7,11 +7,11 @@ import ( "io" "github.com/tendermint/tendermint/crypto/merkle" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/bits" tmbytes "github.com/tendermint/tendermint/libs/bytes" tmjson "github.com/tendermint/tendermint/libs/json" tmmath "github.com/tendermint/tendermint/libs/math" - tmsync "github.com/tendermint/tendermint/libs/sync" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) diff --git a/types/proposal.go b/types/proposal.go index 20f9e5fbe..7b106a750 100644 --- a/types/proposal.go +++ b/types/proposal.go @@ -5,8 +5,8 @@ import ( "fmt" "time" + "github.com/tendermint/tendermint/internal/libs/protoio" tmbytes "github.com/tendermint/tendermint/libs/bytes" - "github.com/tendermint/tendermint/libs/protoio" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" ) diff --git a/types/proposal_test.go b/types/proposal_test.go index 360d949bb..47f5a8890 100644 --- a/types/proposal_test.go +++ b/types/proposal_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto/tmhash" - "github.com/tendermint/tendermint/libs/protoio" + "github.com/tendermint/tendermint/internal/libs/protoio" tmrand "github.com/tendermint/tendermint/libs/rand" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) diff --git a/types/tx_test.go b/types/tx_test.go index 931b1f00d..8fe277da8 100644 --- a/types/tx_test.go +++ b/types/tx_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + ctest "github.com/tendermint/tendermint/internal/libs/test" tmrand "github.com/tendermint/tendermint/libs/rand" - ctest "github.com/tendermint/tendermint/libs/test" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) diff --git a/types/vote.go b/types/vote.go index 7b841c28a..e8105ad70 100644 --- a/types/vote.go +++ b/types/vote.go @@ -7,8 +7,8 @@ import ( "time" "github.com/tendermint/tendermint/crypto" + "github.com/tendermint/tendermint/internal/libs/protoio" tmbytes "github.com/tendermint/tendermint/libs/bytes" - "github.com/tendermint/tendermint/libs/protoio" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) diff --git a/types/vote_set.go b/types/vote_set.go index 3e023a735..b064f2c07 100644 --- a/types/vote_set.go +++ b/types/vote_set.go @@ -5,9 +5,9 @@ import ( "fmt" "strings" + tmsync "github.com/tendermint/tendermint/internal/libs/sync" "github.com/tendermint/tendermint/libs/bits" tmjson "github.com/tendermint/tendermint/libs/json" - tmsync "github.com/tendermint/tendermint/libs/sync" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) diff --git a/types/vote_test.go b/types/vote_test.go index 28fc2dd42..bfd1c4164 100644 --- a/types/vote_test.go +++ b/types/vote_test.go @@ -12,7 +12,7 @@ import ( "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/tmhash" - "github.com/tendermint/tendermint/libs/protoio" + "github.com/tendermint/tendermint/internal/libs/protoio" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" )