From 044f1bf288192cd49a400511189178270f02d48a Mon Sep 17 00:00:00 2001 From: Marko Date: Mon, 23 Mar 2020 09:19:26 +0100 Subject: [PATCH] format: add format cmd & goimport repo (#4586) * format: add format cmd & goimport repo - replaced format command - added goimports to format command - ran goimports Signed-off-by: Marko Baricevic * fix outliers & undo proto file changes --- Makefile | 7 ++++--- abci/example/kvstore/kvstore.go | 3 ++- abci/example/kvstore/persistent_kvstore.go | 3 ++- blockchain/v0/codec.go | 1 + blockchain/v0/reactor_test.go | 6 +++--- blockchain/v1/codec.go | 1 + blockchain/v1/reactor.go | 1 + blockchain/v1/reactor_fsm_test.go | 1 + blockchain/v1/reactor_test.go | 3 ++- blockchain/v2/codec.go | 1 + blockchain/v2/processor_test.go | 1 + blockchain/v2/reactor.go | 1 + blockchain/v2/reactor_test.go | 3 ++- blockchain/v2/routine.go | 1 + blockchain/v2/scheduler_test.go | 1 + cmd/tendermint/commands/codec.go | 1 + cmd/tendermint/commands/debug/dump.go | 1 + cmd/tendermint/commands/debug/util.go | 1 + consensus/byzantine_test.go | 1 + consensus/codec.go | 1 + consensus/common_test.go | 3 ++- consensus/mempool_test.go | 3 ++- consensus/reactor.go | 1 + consensus/reactor_test.go | 3 ++- consensus/replay_test.go | 3 ++- consensus/types/codec.go | 1 + consensus/types/round_state_test.go | 1 + consensus/wal.go | 1 + consensus/wal_generator.go | 3 ++- crypto/ed25519/ed25519_test.go | 1 + crypto/encoding/amino/amino.go | 1 + crypto/encoding/amino/encode_test.go | 1 + crypto/merkle/simple_map.go | 1 + crypto/merkle/simple_proof.go | 1 + crypto/multisig/bitarray/compact_bit_array_test.go | 1 + crypto/multisig/codec.go | 1 + crypto/secp256k1/secp256k1.go | 1 + crypto/secp256k1/secp256k1_cgo_test.go | 3 ++- crypto/sr25519/codec.go | 1 + crypto/tmhash/hash_test.go | 1 + evidence/codec.go | 1 + evidence/pool.go | 4 ++-- evidence/pool_test.go | 3 ++- evidence/reactor_test.go | 3 ++- evidence/store.go | 3 ++- evidence/store_test.go | 3 ++- libs/clist/clist_test.go | 1 + libs/kv/kvpair.go | 1 - libs/log/tmfmt_logger_test.go | 1 + libs/log/tracing_logger_test.go | 1 + libs/pubsub/pubsub.go | 1 + lite/dbprovider.go | 3 ++- lite/dynamic_verifier_test.go | 3 ++- lite/provider_test.go | 3 ++- lite/proxy/verifier.go | 3 ++- lite2/client_benchmark_test.go | 3 ++- node/codec.go | 1 + node/node.go | 3 ++- node/node_test.go | 3 ++- p2p/codec.go | 1 + p2p/conn/codec.go | 1 + p2p/conn/connection.go | 1 + p2p/conn/connection_test.go | 1 + p2p/conn/secret_connection_test.go | 1 + p2p/key_test.go | 1 + p2p/node_info_test.go | 1 + p2p/pex/addrbook_test.go | 1 + p2p/pex/pex_reactor.go | 1 + p2p/trust/store.go | 3 ++- p2p/trust/store_test.go | 3 ++- privval/codec.go | 1 + privval/file_test.go | 1 + privval/messages.go | 1 + privval/socket_dialers.go | 1 + rpc/client/codec.go | 1 + rpc/client/helpers.go | 1 + rpc/client/helpers_test.go | 1 + rpc/core/blocks_test.go | 3 ++- rpc/core/pipe.go | 3 ++- rpc/core/types/codec.go | 1 + rpc/lib/client/integration_test.go | 1 + rpc/lib/client/ws_client.go | 1 + rpc/lib/client/ws_client_test.go | 1 + rpc/lib/rpc_test.go | 1 + rpc/lib/server/http_json_handler_test.go | 1 + rpc/lib/server/parse_test.go | 1 + scripts/json2wal/main.go | 1 + scripts/privValUpgrade_test.go | 1 + scripts/wal2json/main.go | 1 + state/codec.go | 1 + state/execution.go | 3 ++- state/execution_test.go | 1 + state/export_test.go | 3 ++- state/state_test.go | 7 ++++--- state/store.go | 3 ++- state/store_test.go | 3 ++- state/tx_filter_test.go | 3 ++- state/txindex/indexer_service_test.go | 3 ++- state/txindex/kv/kv_bench_test.go | 3 ++- state/validation.go | 3 ++- state/validation_test.go | 2 +- store/codec.go | 1 + test/app/grpc_client.go | 1 + types/codec.go | 1 + types/events.go | 1 + types/evidence.go | 1 + types/params_test.go | 1 + types/proposal_test.go | 1 + types/protobuf_test.go | 1 + types/results_test.go | 1 + types/validator_set.go | 1 + 111 files changed, 152 insertions(+), 46 deletions(-) diff --git a/Makefile b/Makefile index da4d440e7..a5b7db85a 100644 --- a/Makefile +++ b/Makefile @@ -134,9 +134,10 @@ clean_certs: ### Formatting, linting, and vetting ### ############################################################################### -fmt: - @go fmt ./... -.PHONY: fmt +format: + find . -name '*.go' -type f -not -path "*.git*" -not -name '*.pb.go' -not -name '*pb_test.go' | xargs gofmt -w -s + find . -name '*.go' -type f -not -path "*.git*" -not -name '*.pb.go' -not -name '*pb_test.go' | xargs goimports -w -local github.com/tendermint/tendermint +.PHONY: format lint: @echo "--> Running linter" diff --git a/abci/example/kvstore/kvstore.go b/abci/example/kvstore/kvstore.go index 4e7449938..ef9dcee92 100644 --- a/abci/example/kvstore/kvstore.go +++ b/abci/example/kvstore/kvstore.go @@ -6,11 +6,12 @@ import ( "encoding/json" "fmt" + dbm "github.com/tendermint/tm-db" + "github.com/tendermint/tendermint/abci/example/code" "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/kv" "github.com/tendermint/tendermint/version" - dbm "github.com/tendermint/tm-db" ) var ( diff --git a/abci/example/kvstore/persistent_kvstore.go b/abci/example/kvstore/persistent_kvstore.go index 0c5498bee..fffc617be 100644 --- a/abci/example/kvstore/persistent_kvstore.go +++ b/abci/example/kvstore/persistent_kvstore.go @@ -7,12 +7,13 @@ import ( "strconv" "strings" + dbm "github.com/tendermint/tm-db" + "github.com/tendermint/tendermint/abci/example/code" "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/libs/log" tmtypes "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" ) const ( diff --git a/blockchain/v0/codec.go b/blockchain/v0/codec.go index 4494f41aa..f023bbfa1 100644 --- a/blockchain/v0/codec.go +++ b/blockchain/v0/codec.go @@ -2,6 +2,7 @@ package v0 import ( amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/types" ) diff --git a/blockchain/v0/reactor_test.go b/blockchain/v0/reactor_test.go index 5a97d3aed..74811dd0a 100644 --- a/blockchain/v0/reactor_test.go +++ b/blockchain/v0/reactor_test.go @@ -7,10 +7,10 @@ import ( "time" "github.com/pkg/errors" - "github.com/tendermint/tendermint/store" - "github.com/stretchr/testify/assert" + dbm "github.com/tendermint/tm-db" + abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/libs/log" @@ -18,9 +18,9 @@ import ( "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/proxy" sm "github.com/tendermint/tendermint/state" + "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" - dbm "github.com/tendermint/tm-db" ) var config *cfg.Config diff --git a/blockchain/v1/codec.go b/blockchain/v1/codec.go index 786584435..ce4f7dfab 100644 --- a/blockchain/v1/codec.go +++ b/blockchain/v1/codec.go @@ -2,6 +2,7 @@ package v1 import ( amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/types" ) diff --git a/blockchain/v1/reactor.go b/blockchain/v1/reactor.go index 1aba26b35..d3b9b0216 100644 --- a/blockchain/v1/reactor.go +++ b/blockchain/v1/reactor.go @@ -7,6 +7,7 @@ import ( "time" amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/behaviour" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/p2p" diff --git a/blockchain/v1/reactor_fsm_test.go b/blockchain/v1/reactor_fsm_test.go index f51defb51..5980ceb08 100644 --- a/blockchain/v1/reactor_fsm_test.go +++ b/blockchain/v1/reactor_fsm_test.go @@ -6,6 +6,7 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/tendermint/tendermint/libs/log" tmmath "github.com/tendermint/tendermint/libs/math" tmrand "github.com/tendermint/tendermint/libs/rand" diff --git a/blockchain/v1/reactor_test.go b/blockchain/v1/reactor_test.go index d0e55695b..ec9707f67 100644 --- a/blockchain/v1/reactor_test.go +++ b/blockchain/v1/reactor_test.go @@ -12,6 +12,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + dbm "github.com/tendermint/tm-db" + abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/libs/log" @@ -22,7 +24,6 @@ import ( "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" - dbm "github.com/tendermint/tm-db" ) var config *cfg.Config diff --git a/blockchain/v2/codec.go b/blockchain/v2/codec.go index f970d115f..4e92846c4 100644 --- a/blockchain/v2/codec.go +++ b/blockchain/v2/codec.go @@ -2,6 +2,7 @@ package v2 import ( amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/types" ) diff --git a/blockchain/v2/processor_test.go b/blockchain/v2/processor_test.go index fc35c4c72..6bc36b2d3 100644 --- a/blockchain/v2/processor_test.go +++ b/blockchain/v2/processor_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/tendermint/tendermint/p2p" tmState "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" diff --git a/blockchain/v2/reactor.go b/blockchain/v2/reactor.go index 767e59819..e09e0adde 100644 --- a/blockchain/v2/reactor.go +++ b/blockchain/v2/reactor.go @@ -7,6 +7,7 @@ import ( "time" "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/behaviour" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/p2p" diff --git a/blockchain/v2/reactor_test.go b/blockchain/v2/reactor_test.go index ad091f582..1d3e51e77 100644 --- a/blockchain/v2/reactor_test.go +++ b/blockchain/v2/reactor_test.go @@ -10,6 +10,8 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/assert" + dbm "github.com/tendermint/tm-db" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/behaviour" cfg "github.com/tendermint/tendermint/config" @@ -23,7 +25,6 @@ import ( "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" - dbm "github.com/tendermint/tm-db" ) type mockPeer struct { diff --git a/blockchain/v2/routine.go b/blockchain/v2/routine.go index 1a883c3c4..ff12bfebc 100644 --- a/blockchain/v2/routine.go +++ b/blockchain/v2/routine.go @@ -5,6 +5,7 @@ import ( "sync/atomic" "github.com/Workiva/go-datastructures/queue" + "github.com/tendermint/tendermint/libs/log" ) diff --git a/blockchain/v2/scheduler_test.go b/blockchain/v2/scheduler_test.go index 445ba51a7..c91fdd366 100644 --- a/blockchain/v2/scheduler_test.go +++ b/blockchain/v2/scheduler_test.go @@ -8,6 +8,7 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/types" ) diff --git a/cmd/tendermint/commands/codec.go b/cmd/tendermint/commands/codec.go index 717f2d21e..041b9e9ce 100644 --- a/cmd/tendermint/commands/codec.go +++ b/cmd/tendermint/commands/codec.go @@ -2,6 +2,7 @@ package commands import ( amino "github.com/tendermint/go-amino" + cryptoamino "github.com/tendermint/tendermint/crypto/encoding/amino" ) diff --git a/cmd/tendermint/commands/debug/dump.go b/cmd/tendermint/commands/debug/dump.go index 33cb3e24d..7032206b4 100644 --- a/cmd/tendermint/commands/debug/dump.go +++ b/cmd/tendermint/commands/debug/dump.go @@ -10,6 +10,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/viper" + cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/libs/cli" rpcclient "github.com/tendermint/tendermint/rpc/client" diff --git a/cmd/tendermint/commands/debug/util.go b/cmd/tendermint/commands/debug/util.go index b392d23d7..0e7888121 100644 --- a/cmd/tendermint/commands/debug/util.go +++ b/cmd/tendermint/commands/debug/util.go @@ -9,6 +9,7 @@ import ( "path/filepath" "github.com/pkg/errors" + cfg "github.com/tendermint/tendermint/config" rpcclient "github.com/tendermint/tendermint/rpc/client" ) diff --git a/consensus/byzantine_test.go b/consensus/byzantine_test.go index bbf9cbf8f..649d47fbb 100644 --- a/consensus/byzantine_test.go +++ b/consensus/byzantine_test.go @@ -8,6 +8,7 @@ import ( "time" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/service" "github.com/tendermint/tendermint/p2p" sm "github.com/tendermint/tendermint/state" diff --git a/consensus/codec.go b/consensus/codec.go index 1c5bf93df..ae7dbaab2 100644 --- a/consensus/codec.go +++ b/consensus/codec.go @@ -2,6 +2,7 @@ package consensus import ( amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/types" ) diff --git a/consensus/common_test.go b/consensus/common_test.go index 1b2c818ae..f8055f01c 100644 --- a/consensus/common_test.go +++ b/consensus/common_test.go @@ -18,6 +18,8 @@ import ( "path" + dbm "github.com/tendermint/tm-db" + abcicli "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/counter" "github.com/tendermint/tendermint/abci/example/kvstore" @@ -35,7 +37,6 @@ import ( "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" - dbm "github.com/tendermint/tm-db" ) const ( diff --git a/consensus/mempool_test.go b/consensus/mempool_test.go index c7fdbd578..8e268d444 100644 --- a/consensus/mempool_test.go +++ b/consensus/mempool_test.go @@ -9,12 +9,13 @@ import ( "github.com/stretchr/testify/assert" + dbm "github.com/tendermint/tm-db" + "github.com/tendermint/tendermint/abci/example/code" abci "github.com/tendermint/tendermint/abci/types" mempl "github.com/tendermint/tendermint/mempool" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" ) // for testing diff --git a/consensus/reactor.go b/consensus/reactor.go index 0f2dad743..61e46c7c4 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -9,6 +9,7 @@ import ( "github.com/pkg/errors" amino "github.com/tendermint/go-amino" + cstypes "github.com/tendermint/tendermint/consensus/types" "github.com/tendermint/tendermint/libs/bits" tmevents "github.com/tendermint/tendermint/libs/events" diff --git a/consensus/reactor_test.go b/consensus/reactor_test.go index 95ee6cdc5..a0a8c9732 100644 --- a/consensus/reactor_test.go +++ b/consensus/reactor_test.go @@ -14,6 +14,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + dbm "github.com/tendermint/tm-db" + abcicli "github.com/tendermint/tendermint/abci/client" "github.com/tendermint/tendermint/abci/example/kvstore" abci "github.com/tendermint/tendermint/abci/types" @@ -29,7 +31,6 @@ import ( sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" ) //---------------------------------------------- diff --git a/consensus/replay_test.go b/consensus/replay_test.go index 24903927d..bbb73c9be 100644 --- a/consensus/replay_test.go +++ b/consensus/replay_test.go @@ -17,6 +17,8 @@ import ( "sort" + dbm "github.com/tendermint/tm-db" + "github.com/tendermint/tendermint/abci/example/kvstore" abci "github.com/tendermint/tendermint/abci/types" cfg "github.com/tendermint/tendermint/config" @@ -30,7 +32,6 @@ import ( sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" "github.com/tendermint/tendermint/version" - dbm "github.com/tendermint/tm-db" ) func TestMain(m *testing.M) { diff --git a/consensus/types/codec.go b/consensus/types/codec.go index e8a05b355..69ac8c4a5 100644 --- a/consensus/types/codec.go +++ b/consensus/types/codec.go @@ -2,6 +2,7 @@ package types import ( amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/types" ) diff --git a/consensus/types/round_state_test.go b/consensus/types/round_state_test.go index f5f5f72c0..131158f0e 100644 --- a/consensus/types/round_state_test.go +++ b/consensus/types/round_state_test.go @@ -4,6 +4,7 @@ import ( "testing" amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/tmhash" tmrand "github.com/tendermint/tendermint/libs/rand" diff --git a/consensus/wal.go b/consensus/wal.go index 989a5dc29..7b09ffa2d 100644 --- a/consensus/wal.go +++ b/consensus/wal.go @@ -11,6 +11,7 @@ import ( "github.com/pkg/errors" amino "github.com/tendermint/go-amino" + auto "github.com/tendermint/tendermint/libs/autofile" "github.com/tendermint/tendermint/libs/log" tmos "github.com/tendermint/tendermint/libs/os" diff --git a/consensus/wal_generator.go b/consensus/wal_generator.go index 244edd536..422c3f73b 100644 --- a/consensus/wal_generator.go +++ b/consensus/wal_generator.go @@ -11,6 +11,8 @@ import ( "github.com/pkg/errors" + db "github.com/tendermint/tm-db" + "github.com/tendermint/tendermint/abci/example/kvstore" cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/libs/log" @@ -21,7 +23,6 @@ import ( sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/types" - db "github.com/tendermint/tm-db" ) // WALGenerateNBlocks generates a consensus WAL. It does this by spinning up a diff --git a/crypto/ed25519/ed25519_test.go b/crypto/ed25519/ed25519_test.go index 503050274..6fe2c0946 100644 --- a/crypto/ed25519/ed25519_test.go +++ b/crypto/ed25519/ed25519_test.go @@ -5,6 +5,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" ) diff --git a/crypto/encoding/amino/amino.go b/crypto/encoding/amino/amino.go index b63eb738d..f7a2dde77 100644 --- a/crypto/encoding/amino/amino.go +++ b/crypto/encoding/amino/amino.go @@ -4,6 +4,7 @@ import ( "reflect" amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/multisig" diff --git a/crypto/encoding/amino/encode_test.go b/crypto/encoding/amino/encode_test.go index 67a7566dd..edc54292f 100644 --- a/crypto/encoding/amino/encode_test.go +++ b/crypto/encoding/amino/encode_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/require" amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/multisig" diff --git a/crypto/merkle/simple_map.go b/crypto/merkle/simple_map.go index 36434f67f..840bebd51 100644 --- a/crypto/merkle/simple_map.go +++ b/crypto/merkle/simple_map.go @@ -4,6 +4,7 @@ import ( "bytes" amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/crypto/tmhash" "github.com/tendermint/tendermint/libs/kv" ) diff --git a/crypto/merkle/simple_proof.go b/crypto/merkle/simple_proof.go index 660bf236f..44b97f606 100644 --- a/crypto/merkle/simple_proof.go +++ b/crypto/merkle/simple_proof.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/pkg/errors" + "github.com/tendermint/tendermint/crypto/tmhash" ) diff --git a/crypto/multisig/bitarray/compact_bit_array_test.go b/crypto/multisig/bitarray/compact_bit_array_test.go index ba0949178..f086dc877 100644 --- a/crypto/multisig/bitarray/compact_bit_array_test.go +++ b/crypto/multisig/bitarray/compact_bit_array_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + tmrand "github.com/tendermint/tendermint/libs/rand" ) diff --git a/crypto/multisig/codec.go b/crypto/multisig/codec.go index 3a5869398..cc1e12f92 100644 --- a/crypto/multisig/codec.go +++ b/crypto/multisig/codec.go @@ -2,6 +2,7 @@ package multisig import ( amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/secp256k1" diff --git a/crypto/secp256k1/secp256k1.go b/crypto/secp256k1/secp256k1.go index 26dcead59..5338d10a5 100644 --- a/crypto/secp256k1/secp256k1.go +++ b/crypto/secp256k1/secp256k1.go @@ -12,6 +12,7 @@ import ( "golang.org/x/crypto/ripemd160" // nolint: staticcheck // necessary for Bitcoin address format amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/crypto" ) diff --git a/crypto/secp256k1/secp256k1_cgo_test.go b/crypto/secp256k1/secp256k1_cgo_test.go index edb207b53..96b026bc9 100644 --- a/crypto/secp256k1/secp256k1_cgo_test.go +++ b/crypto/secp256k1/secp256k1_cgo_test.go @@ -3,9 +3,10 @@ package secp256k1 import ( - "github.com/magiconair/properties/assert" "testing" + "github.com/magiconair/properties/assert" + "github.com/stretchr/testify/require" ) diff --git a/crypto/sr25519/codec.go b/crypto/sr25519/codec.go index c3e6bd646..f33b616f9 100644 --- a/crypto/sr25519/codec.go +++ b/crypto/sr25519/codec.go @@ -2,6 +2,7 @@ package sr25519 import ( amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/crypto" ) diff --git a/crypto/tmhash/hash_test.go b/crypto/tmhash/hash_test.go index 89a779801..57fd0faa5 100644 --- a/crypto/tmhash/hash_test.go +++ b/crypto/tmhash/hash_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/tendermint/tendermint/crypto/tmhash" ) diff --git a/evidence/codec.go b/evidence/codec.go index 135341068..650a34607 100644 --- a/evidence/codec.go +++ b/evidence/codec.go @@ -2,6 +2,7 @@ package evidence import ( amino "github.com/tendermint/go-amino" + cryptoamino "github.com/tendermint/tendermint/crypto/encoding/amino" "github.com/tendermint/tendermint/types" ) diff --git a/evidence/pool.go b/evidence/pool.go index 62b0a3325..a4d72cd2f 100644 --- a/evidence/pool.go +++ b/evidence/pool.go @@ -5,10 +5,10 @@ import ( "sync" "time" - clist "github.com/tendermint/tendermint/libs/clist" - "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" + clist "github.com/tendermint/tendermint/libs/clist" + "github.com/tendermint/tendermint/libs/log" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" ) diff --git a/evidence/pool_test.go b/evidence/pool_test.go index a39ae3eb5..844ca18af 100644 --- a/evidence/pool_test.go +++ b/evidence/pool_test.go @@ -8,10 +8,11 @@ import ( "github.com/stretchr/testify/assert" + dbm "github.com/tendermint/tm-db" + sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" - dbm "github.com/tendermint/tm-db" ) func TestMain(m *testing.M) { diff --git a/evidence/reactor_test.go b/evidence/reactor_test.go index b013b7715..135c191da 100644 --- a/evidence/reactor_test.go +++ b/evidence/reactor_test.go @@ -9,12 +9,13 @@ import ( "github.com/go-kit/kit/log/term" "github.com/stretchr/testify/assert" + dbm "github.com/tendermint/tm-db" + cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/crypto/secp256k1" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" ) // evidenceLogger is a TestingLogger which uses a different diff --git a/evidence/store.go b/evidence/store.go index 3547b5ffc..2bfe68523 100644 --- a/evidence/store.go +++ b/evidence/store.go @@ -3,8 +3,9 @@ package evidence import ( "fmt" - "github.com/tendermint/tendermint/types" dbm "github.com/tendermint/tm-db" + + "github.com/tendermint/tendermint/types" ) /* diff --git a/evidence/store_test.go b/evidence/store_test.go index b85a6437b..351abfee2 100644 --- a/evidence/store_test.go +++ b/evidence/store_test.go @@ -5,8 +5,9 @@ import ( "time" "github.com/stretchr/testify/assert" - "github.com/tendermint/tendermint/types" dbm "github.com/tendermint/tm-db" + + "github.com/tendermint/tendermint/types" ) //------------------------------------------- diff --git a/libs/clist/clist_test.go b/libs/clist/clist_test.go index 1e25946ac..14b7e37c0 100644 --- a/libs/clist/clist_test.go +++ b/libs/clist/clist_test.go @@ -8,6 +8,7 @@ import ( "time" "github.com/stretchr/testify/assert" + tmrand "github.com/tendermint/tendermint/libs/rand" ) diff --git a/libs/kv/kvpair.go b/libs/kv/kvpair.go index 8eebae606..2474b2e47 100644 --- a/libs/kv/kvpair.go +++ b/libs/kv/kvpair.go @@ -35,4 +35,3 @@ func (kvs Pairs) Less(i, j int) bool { } func (kvs Pairs) Swap(i, j int) { kvs[i], kvs[j] = kvs[j], kvs[i] } func (kvs Pairs) Sort() { sort.Sort(kvs) } - diff --git a/libs/log/tmfmt_logger_test.go b/libs/log/tmfmt_logger_test.go index d6f039ce4..86d0e5693 100644 --- a/libs/log/tmfmt_logger_test.go +++ b/libs/log/tmfmt_logger_test.go @@ -10,6 +10,7 @@ import ( kitlog "github.com/go-kit/kit/log" "github.com/stretchr/testify/assert" + "github.com/tendermint/tendermint/libs/log" ) diff --git a/libs/log/tracing_logger_test.go b/libs/log/tracing_logger_test.go index b40d2b9e0..354476755 100644 --- a/libs/log/tracing_logger_test.go +++ b/libs/log/tracing_logger_test.go @@ -8,6 +8,7 @@ import ( "testing" "github.com/pkg/errors" + "github.com/tendermint/tendermint/libs/log" ) diff --git a/libs/pubsub/pubsub.go b/libs/pubsub/pubsub.go index 325403cd8..2a89e7591 100644 --- a/libs/pubsub/pubsub.go +++ b/libs/pubsub/pubsub.go @@ -39,6 +39,7 @@ import ( "sync" "github.com/pkg/errors" + "github.com/tendermint/tendermint/libs/service" ) diff --git a/lite/dbprovider.go b/lite/dbprovider.go index 35f7270ae..9b1580314 100644 --- a/lite/dbprovider.go +++ b/lite/dbprovider.go @@ -6,11 +6,12 @@ import ( "strconv" amino "github.com/tendermint/go-amino" + dbm "github.com/tendermint/tm-db" + cryptoamino "github.com/tendermint/tendermint/crypto/encoding/amino" log "github.com/tendermint/tendermint/libs/log" lerr "github.com/tendermint/tendermint/lite/errors" "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" ) var _ PersistentProvider = (*DBProvider)(nil) diff --git a/lite/dynamic_verifier_test.go b/lite/dynamic_verifier_test.go index 441010efb..fdb89052b 100644 --- a/lite/dynamic_verifier_test.go +++ b/lite/dynamic_verifier_test.go @@ -8,9 +8,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + dbm "github.com/tendermint/tm-db" + log "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" ) const testChainID = "inquiry-test" diff --git a/lite/provider_test.go b/lite/provider_test.go index 98fff8cb4..b820418ff 100644 --- a/lite/provider_test.go +++ b/lite/provider_test.go @@ -7,10 +7,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + dbm "github.com/tendermint/tm-db" + log "github.com/tendermint/tendermint/libs/log" lerr "github.com/tendermint/tendermint/lite/errors" "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" ) // missingProvider doesn't store anything, always a miss. diff --git a/lite/proxy/verifier.go b/lite/proxy/verifier.go index b5fc3af3f..5486a3ea9 100644 --- a/lite/proxy/verifier.go +++ b/lite/proxy/verifier.go @@ -3,10 +3,11 @@ package proxy import ( "github.com/pkg/errors" + dbm "github.com/tendermint/tm-db" + log "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/lite" lclient "github.com/tendermint/tendermint/lite/client" - dbm "github.com/tendermint/tm-db" ) func NewVerifier( diff --git a/lite2/client_benchmark_test.go b/lite2/client_benchmark_test.go index 823ff1156..276c962a1 100644 --- a/lite2/client_benchmark_test.go +++ b/lite2/client_benchmark_test.go @@ -4,11 +4,12 @@ import ( "testing" "time" + dbm "github.com/tendermint/tm-db" + "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/lite2/provider" mockp "github.com/tendermint/tendermint/lite2/provider/mock" dbs "github.com/tendermint/tendermint/lite2/store/db" - dbm "github.com/tendermint/tm-db" ) // NOTE: block is produced every minute. Make sure the verification time diff --git a/node/codec.go b/node/codec.go index 7607b0dd0..e172b9696 100644 --- a/node/codec.go +++ b/node/codec.go @@ -2,6 +2,7 @@ package node import ( amino "github.com/tendermint/go-amino" + cryptoamino "github.com/tendermint/tendermint/crypto/encoding/amino" ) diff --git a/node/node.go b/node/node.go index e9cd02c30..8bc6f1037 100644 --- a/node/node.go +++ b/node/node.go @@ -17,6 +17,8 @@ import ( "github.com/rs/cors" amino "github.com/tendermint/go-amino" + dbm "github.com/tendermint/tm-db" + abci "github.com/tendermint/tendermint/abci/types" bcv0 "github.com/tendermint/tendermint/blockchain/v0" bcv1 "github.com/tendermint/tendermint/blockchain/v1" @@ -45,7 +47,6 @@ import ( "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" "github.com/tendermint/tendermint/version" - dbm "github.com/tendermint/tm-db" ) //------------------------------------------------------------------------------ diff --git a/node/node_test.go b/node/node_test.go index ec8510d58..a9a43a362 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -12,6 +12,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + dbm "github.com/tendermint/tm-db" + "github.com/tendermint/tendermint/abci/example/kvstore" cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/crypto/ed25519" @@ -27,7 +29,6 @@ import ( "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" "github.com/tendermint/tendermint/version" - dbm "github.com/tendermint/tm-db" ) func TestNodeStartStop(t *testing.T) { diff --git a/p2p/codec.go b/p2p/codec.go index 6368b7d68..463276318 100644 --- a/p2p/codec.go +++ b/p2p/codec.go @@ -2,6 +2,7 @@ package p2p import ( amino "github.com/tendermint/go-amino" + cryptoamino "github.com/tendermint/tendermint/crypto/encoding/amino" ) diff --git a/p2p/conn/codec.go b/p2p/conn/codec.go index 149a09638..0625c7a38 100644 --- a/p2p/conn/codec.go +++ b/p2p/conn/codec.go @@ -2,6 +2,7 @@ package conn import ( amino "github.com/tendermint/go-amino" + cryptoamino "github.com/tendermint/tendermint/crypto/encoding/amino" ) diff --git a/p2p/conn/connection.go b/p2p/conn/connection.go index 1c2088636..0436e115c 100644 --- a/p2p/conn/connection.go +++ b/p2p/conn/connection.go @@ -16,6 +16,7 @@ import ( "github.com/pkg/errors" amino "github.com/tendermint/go-amino" + flow "github.com/tendermint/tendermint/libs/flowrate" "github.com/tendermint/tendermint/libs/log" tmmath "github.com/tendermint/tendermint/libs/math" diff --git a/p2p/conn/connection_test.go b/p2p/conn/connection_test.go index 7daa6076d..29d29fc6e 100644 --- a/p2p/conn/connection_test.go +++ b/p2p/conn/connection_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/require" amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/libs/log" ) diff --git a/p2p/conn/secret_connection_test.go b/p2p/conn/secret_connection_test.go index 5ac3b8509..9044d73be 100644 --- a/p2p/conn/secret_connection_test.go +++ b/p2p/conn/secret_connection_test.go @@ -16,6 +16,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/secp256k1" diff --git a/p2p/key_test.go b/p2p/key_test.go index e0579dde6..6f8e9b0f8 100644 --- a/p2p/key_test.go +++ b/p2p/key_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + tmrand "github.com/tendermint/tendermint/libs/rand" ) diff --git a/p2p/node_info_test.go b/p2p/node_info_test.go index 6937affb8..8896efe1d 100644 --- a/p2p/node_info_test.go +++ b/p2p/node_info_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/tendermint/tendermint/crypto/ed25519" ) diff --git a/p2p/pex/addrbook_test.go b/p2p/pex/addrbook_test.go index e5a226daf..739fff185 100644 --- a/p2p/pex/addrbook_test.go +++ b/p2p/pex/addrbook_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" tmmath "github.com/tendermint/tendermint/libs/math" tmrand "github.com/tendermint/tendermint/libs/rand" diff --git a/p2p/pex/pex_reactor.go b/p2p/pex/pex_reactor.go index b0a1c02bb..b0aafe0be 100644 --- a/p2p/pex/pex_reactor.go +++ b/p2p/pex/pex_reactor.go @@ -9,6 +9,7 @@ import ( "github.com/pkg/errors" "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/libs/cmap" tmmath "github.com/tendermint/tendermint/libs/math" "github.com/tendermint/tendermint/libs/rand" diff --git a/p2p/trust/store.go b/p2p/trust/store.go index 502c88f90..166b26b1c 100644 --- a/p2p/trust/store.go +++ b/p2p/trust/store.go @@ -9,8 +9,9 @@ import ( "sync" "time" - "github.com/tendermint/tendermint/libs/service" dbm "github.com/tendermint/tm-db" + + "github.com/tendermint/tendermint/libs/service" ) const defaultStorePeriodicSaveInterval = 1 * time.Minute diff --git a/p2p/trust/store_test.go b/p2p/trust/store_test.go index 76dbaac1c..1cd83916c 100644 --- a/p2p/trust/store_test.go +++ b/p2p/trust/store_test.go @@ -10,8 +10,9 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" + + "github.com/tendermint/tendermint/libs/log" ) func TestTrustMetricStoreSaveLoad(t *testing.T) { diff --git a/privval/codec.go b/privval/codec.go index 9edcc7741..d1f2eafa2 100644 --- a/privval/codec.go +++ b/privval/codec.go @@ -2,6 +2,7 @@ package privval import ( amino "github.com/tendermint/go-amino" + cryptoamino "github.com/tendermint/tendermint/crypto/encoding/amino" ) diff --git a/privval/file_test.go b/privval/file_test.go index 38f6e6fe3..343131e1a 100644 --- a/privval/file_test.go +++ b/privval/file_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" diff --git a/privval/messages.go b/privval/messages.go index c172a5ea1..fa7a0b09d 100644 --- a/privval/messages.go +++ b/privval/messages.go @@ -2,6 +2,7 @@ package privval import ( amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/types" ) diff --git a/privval/socket_dialers.go b/privval/socket_dialers.go index 1945e7728..f9e5c7879 100644 --- a/privval/socket_dialers.go +++ b/privval/socket_dialers.go @@ -5,6 +5,7 @@ import ( "time" "github.com/pkg/errors" + "github.com/tendermint/tendermint/crypto" tmnet "github.com/tendermint/tendermint/libs/net" p2pconn "github.com/tendermint/tendermint/p2p/conn" diff --git a/rpc/client/codec.go b/rpc/client/codec.go index ef1a00ec4..2dc0f6319 100644 --- a/rpc/client/codec.go +++ b/rpc/client/codec.go @@ -2,6 +2,7 @@ package client import ( amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/types" ) diff --git a/rpc/client/helpers.go b/rpc/client/helpers.go index 756ba2818..0e54ec03b 100644 --- a/rpc/client/helpers.go +++ b/rpc/client/helpers.go @@ -5,6 +5,7 @@ import ( "time" "github.com/pkg/errors" + "github.com/tendermint/tendermint/types" ) diff --git a/rpc/client/helpers_test.go b/rpc/client/helpers_test.go index 8b843fcdb..3b78dfe5f 100644 --- a/rpc/client/helpers_test.go +++ b/rpc/client/helpers_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/rpc/client" "github.com/tendermint/tendermint/rpc/client/mock" ctypes "github.com/tendermint/tendermint/rpc/core/types" diff --git a/rpc/core/blocks_test.go b/rpc/core/blocks_test.go index d537f6c3a..1c4c3af13 100644 --- a/rpc/core/blocks_test.go +++ b/rpc/core/blocks_test.go @@ -7,12 +7,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + dbm "github.com/tendermint/tm-db" + abci "github.com/tendermint/tendermint/abci/types" ctypes "github.com/tendermint/tendermint/rpc/core/types" rpctypes "github.com/tendermint/tendermint/rpc/lib/types" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" ) func TestBlockchainInfo(t *testing.T) { diff --git a/rpc/core/pipe.go b/rpc/core/pipe.go index 532493451..4fb3b9b13 100644 --- a/rpc/core/pipe.go +++ b/rpc/core/pipe.go @@ -4,6 +4,8 @@ import ( "fmt" "time" + dbm "github.com/tendermint/tm-db" + cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/consensus" "github.com/tendermint/tendermint/crypto" @@ -14,7 +16,6 @@ import ( sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/state/txindex" "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" ) const ( diff --git a/rpc/core/types/codec.go b/rpc/core/types/codec.go index 82543ff6e..8e0b5303f 100644 --- a/rpc/core/types/codec.go +++ b/rpc/core/types/codec.go @@ -2,6 +2,7 @@ package coretypes import ( amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/types" ) diff --git a/rpc/lib/client/integration_test.go b/rpc/lib/client/integration_test.go index 393783c51..5fee3752b 100644 --- a/rpc/lib/client/integration_test.go +++ b/rpc/lib/client/integration_test.go @@ -14,6 +14,7 @@ import ( "time" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" ) diff --git a/rpc/lib/client/ws_client.go b/rpc/lib/client/ws_client.go index 4d8a58b8e..ddddc97cf 100644 --- a/rpc/lib/client/ws_client.go +++ b/rpc/lib/client/ws_client.go @@ -14,6 +14,7 @@ import ( metrics "github.com/rcrowley/go-metrics" amino "github.com/tendermint/go-amino" + tmrand "github.com/tendermint/tendermint/libs/rand" "github.com/tendermint/tendermint/libs/service" types "github.com/tendermint/tendermint/rpc/lib/types" diff --git a/rpc/lib/client/ws_client_test.go b/rpc/lib/client/ws_client_test.go index 33a65dcbe..a4f033867 100644 --- a/rpc/lib/client/ws_client_test.go +++ b/rpc/lib/client/ws_client_test.go @@ -11,6 +11,7 @@ import ( "github.com/gorilla/websocket" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" types "github.com/tendermint/tendermint/rpc/lib/types" diff --git a/rpc/lib/rpc_test.go b/rpc/lib/rpc_test.go index 5b95666a7..aef795d3e 100644 --- a/rpc/lib/rpc_test.go +++ b/rpc/lib/rpc_test.go @@ -17,6 +17,7 @@ import ( "github.com/stretchr/testify/require" amino "github.com/tendermint/go-amino" + tmbytes "github.com/tendermint/tendermint/libs/bytes" "github.com/tendermint/tendermint/libs/log" tmrand "github.com/tendermint/tendermint/libs/rand" diff --git a/rpc/lib/server/http_json_handler_test.go b/rpc/lib/server/http_json_handler_test.go index e4ae2f8bf..ef1fcc9f5 100644 --- a/rpc/lib/server/http_json_handler_test.go +++ b/rpc/lib/server/http_json_handler_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/require" amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/libs/log" types "github.com/tendermint/tendermint/rpc/lib/types" ) diff --git a/rpc/lib/server/parse_test.go b/rpc/lib/server/parse_test.go index 3780861e4..09a3d18ee 100644 --- a/rpc/lib/server/parse_test.go +++ b/rpc/lib/server/parse_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/assert" amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/libs/bytes" types "github.com/tendermint/tendermint/rpc/lib/types" ) diff --git a/scripts/json2wal/main.go b/scripts/json2wal/main.go index 1d1f6256c..9f6cdb2b6 100644 --- a/scripts/json2wal/main.go +++ b/scripts/json2wal/main.go @@ -15,6 +15,7 @@ import ( "strings" amino "github.com/tendermint/go-amino" + cs "github.com/tendermint/tendermint/consensus" "github.com/tendermint/tendermint/types" ) diff --git a/scripts/privValUpgrade_test.go b/scripts/privValUpgrade_test.go index 248ac7a24..287c4fc50 100644 --- a/scripts/privValUpgrade_test.go +++ b/scripts/privValUpgrade_test.go @@ -8,6 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/privval" ) diff --git a/scripts/wal2json/main.go b/scripts/wal2json/main.go index 48195eead..181f40c75 100644 --- a/scripts/wal2json/main.go +++ b/scripts/wal2json/main.go @@ -13,6 +13,7 @@ import ( "os" amino "github.com/tendermint/go-amino" + cs "github.com/tendermint/tendermint/consensus" "github.com/tendermint/tendermint/types" ) diff --git a/state/codec.go b/state/codec.go index abbec6e39..df2c15545 100644 --- a/state/codec.go +++ b/state/codec.go @@ -2,6 +2,7 @@ package state import ( amino "github.com/tendermint/go-amino" + cryptoamino "github.com/tendermint/tendermint/crypto/encoding/amino" ) diff --git a/state/execution.go b/state/execution.go index 4025b6e7b..15f436463 100644 --- a/state/execution.go +++ b/state/execution.go @@ -4,13 +4,14 @@ import ( "fmt" "time" + dbm "github.com/tendermint/tm-db" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/fail" "github.com/tendermint/tendermint/libs/log" mempl "github.com/tendermint/tendermint/mempool" "github.com/tendermint/tendermint/proxy" "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" ) //----------------------------------------------------------------------------- diff --git a/state/execution_test.go b/state/execution_test.go index 78f4d6ca4..7d1337391 100644 --- a/state/execution_test.go +++ b/state/execution_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/abci/example/kvstore" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/ed25519" diff --git a/state/export_test.go b/state/export_test.go index 1f3990bbd..cba07eca3 100644 --- a/state/export_test.go +++ b/state/export_test.go @@ -1,9 +1,10 @@ package state import ( + dbm "github.com/tendermint/tm-db" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" ) // diff --git a/state/state_test.go b/state/state_test.go index d08792033..746f7837c 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -11,15 +11,16 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + dbm "github.com/tendermint/tm-db" + abci "github.com/tendermint/tendermint/abci/types" + cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/libs/kv" "github.com/tendermint/tendermint/libs/rand" tmrand "github.com/tendermint/tendermint/libs/rand" sm "github.com/tendermint/tendermint/state" - dbm "github.com/tendermint/tm-db" - - cfg "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/types" ) diff --git a/state/store.go b/state/store.go index e49e289f0..efb7bddf0 100644 --- a/state/store.go +++ b/state/store.go @@ -3,11 +3,12 @@ package state import ( "fmt" + dbm "github.com/tendermint/tm-db" + abci "github.com/tendermint/tendermint/abci/types" tmmath "github.com/tendermint/tendermint/libs/math" tmos "github.com/tendermint/tendermint/libs/os" "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" ) const ( diff --git a/state/store_test.go b/state/store_test.go index 0f38f21a5..7661b631f 100644 --- a/state/store_test.go +++ b/state/store_test.go @@ -8,10 +8,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + dbm "github.com/tendermint/tm-db" + cfg "github.com/tendermint/tendermint/config" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" ) func TestStoreLoadValidators(t *testing.T) { diff --git a/state/tx_filter_test.go b/state/tx_filter_test.go index 9e666265c..2dac856bd 100644 --- a/state/tx_filter_test.go +++ b/state/tx_filter_test.go @@ -7,10 +7,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + dbm "github.com/tendermint/tm-db" + tmrand "github.com/tendermint/tendermint/libs/rand" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" ) func TestTxFilter(t *testing.T) { diff --git a/state/txindex/indexer_service_test.go b/state/txindex/indexer_service_test.go index 6df7c984a..23968dbca 100644 --- a/state/txindex/indexer_service_test.go +++ b/state/txindex/indexer_service_test.go @@ -7,12 +7,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + db "github.com/tendermint/tm-db" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/state/txindex" "github.com/tendermint/tendermint/state/txindex/kv" "github.com/tendermint/tendermint/types" - db "github.com/tendermint/tm-db" ) func TestIndexerServiceIndexesBlocks(t *testing.T) { diff --git a/state/txindex/kv/kv_bench_test.go b/state/txindex/kv/kv_bench_test.go index 34d770040..31267f54c 100644 --- a/state/txindex/kv/kv_bench_test.go +++ b/state/txindex/kv/kv_bench_test.go @@ -7,11 +7,12 @@ import ( "io/ioutil" "testing" + dbm "github.com/tendermint/tm-db" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/kv" "github.com/tendermint/tendermint/libs/pubsub/query" "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" ) func BenchmarkTxSearch(b *testing.B) { diff --git a/state/validation.go b/state/validation.go index 6c306e2df..41f12cc40 100644 --- a/state/validation.go +++ b/state/validation.go @@ -5,9 +5,10 @@ import ( "errors" "fmt" + dbm "github.com/tendermint/tm-db" + "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" ) //----------------------------------------------------- diff --git a/state/validation_test.go b/state/validation_test.go index d7d875f41..373b77dc1 100644 --- a/state/validation_test.go +++ b/state/validation_test.go @@ -5,11 +5,11 @@ import ( "time" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/mock" "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/tmhash" "github.com/tendermint/tendermint/libs/log" + "github.com/tendermint/tendermint/mock" sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" diff --git a/store/codec.go b/store/codec.go index 4895e8994..29a59948d 100644 --- a/store/codec.go +++ b/store/codec.go @@ -2,6 +2,7 @@ package store import ( amino "github.com/tendermint/go-amino" + "github.com/tendermint/tendermint/types" ) diff --git a/test/app/grpc_client.go b/test/app/grpc_client.go index 354443e5c..88e4650ab 100644 --- a/test/app/grpc_client.go +++ b/test/app/grpc_client.go @@ -8,6 +8,7 @@ import ( "context" amino "github.com/tendermint/go-amino" + coregrpc "github.com/tendermint/tendermint/rpc/grpc" ) diff --git a/types/codec.go b/types/codec.go index d77f2b29d..b4989d267 100644 --- a/types/codec.go +++ b/types/codec.go @@ -2,6 +2,7 @@ package types import ( amino "github.com/tendermint/go-amino" + cryptoamino "github.com/tendermint/tendermint/crypto/encoding/amino" ) diff --git a/types/events.go b/types/events.go index fb80db0f0..c257ba328 100644 --- a/types/events.go +++ b/types/events.go @@ -4,6 +4,7 @@ import ( "fmt" amino "github.com/tendermint/go-amino" + abci "github.com/tendermint/tendermint/abci/types" tmpubsub "github.com/tendermint/tendermint/libs/pubsub" tmquery "github.com/tendermint/tendermint/libs/pubsub/query" diff --git a/types/evidence.go b/types/evidence.go index 303deeca9..244244f9e 100644 --- a/types/evidence.go +++ b/types/evidence.go @@ -7,6 +7,7 @@ import ( "time" "github.com/pkg/errors" + "github.com/tendermint/tendermint/crypto/tmhash" amino "github.com/tendermint/go-amino" diff --git a/types/params_test.go b/types/params_test.go index 719d51da0..b446bda33 100644 --- a/types/params_test.go +++ b/types/params_test.go @@ -7,6 +7,7 @@ import ( "time" "github.com/stretchr/testify/assert" + abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/types/proposal_test.go b/types/proposal_test.go index a1d0fac37..e4ea19183 100644 --- a/types/proposal_test.go +++ b/types/proposal_test.go @@ -7,6 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/crypto/tmhash" ) diff --git a/types/protobuf_test.go b/types/protobuf_test.go index 3f4cef9ce..636091b5c 100644 --- a/types/protobuf_test.go +++ b/types/protobuf_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/require" amino "github.com/tendermint/go-amino" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/crypto/ed25519" diff --git a/types/results_test.go b/types/results_test.go index a37de9ec4..9ecfe35ca 100644 --- a/types/results_test.go +++ b/types/results_test.go @@ -5,6 +5,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" ) diff --git a/types/validator_set.go b/types/validator_set.go index 04de50646..1a17d1e83 100644 --- a/types/validator_set.go +++ b/types/validator_set.go @@ -9,6 +9,7 @@ import ( "strings" "github.com/pkg/errors" + "github.com/tendermint/tendermint/crypto/merkle" tmmath "github.com/tendermint/tendermint/libs/math" )