From 8fd66a6e8defbecc1e98996d67c31aaff8e59ed5 Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Thu, 24 Nov 2022 21:53:57 +0700 Subject: [PATCH] make format (#9744) ## NOTE: this pr exclusively runs commands from the makefile found here This PR ONLY runs `make format` ... then `make mockery` Its purpose is to ensure that the review scope of other PR's, which changed .go files and thus triggered the linter that only runs conditionally, have smaller review scopes, and should be merged before: https://github.com/tendermint/tendermint/pull/9738 https://github.com/tendermint/tendermint/pull/9739 https://github.com/tendermint/tendermint/pull/9742 --- #### PR checklist - [x] Tests written/updated, or no tests needed - [x] `CHANGELOG_PENDING.md` updated, or no changelog entry needed - [x] Updated relevant documentation (`docs/`) and code comments, or no documentation updates needed --- abci/types/messages.go | 1 + consensus/msgs.go | 1 + evidence/reactor.go | 1 + libs/pubsub/query/query_test.go | 1 + p2p/switch.go | 1 + p2p/transport.go | 1 + p2p/types.go | 1 + proto/tendermint/blocksync/message.go | 1 + proto/tendermint/consensus/message.go | 1 + proto/tendermint/mempool/message.go | 1 + proto/tendermint/statesync/message.go | 1 + state/execution_test.go | 3 ++- state/indexer/block/kv/util.go | 1 + state/validation_test.go | 3 ++- test/loadtime/cmd/load/main.go | 1 + test/loadtime/cmd/report/main.go | 3 ++- test/loadtime/payload/payload_test.go | 1 + test/loadtime/report/report.go | 3 ++- test/loadtime/report/report_test.go | 3 ++- 19 files changed, 24 insertions(+), 5 deletions(-) diff --git a/abci/types/messages.go b/abci/types/messages.go index 92a9616c5..0720ac991 100644 --- a/abci/types/messages.go +++ b/abci/types/messages.go @@ -4,6 +4,7 @@ import ( "io" "github.com/cosmos/gogoproto/proto" + "github.com/tendermint/tendermint/libs/protoio" ) diff --git a/consensus/msgs.go b/consensus/msgs.go index 6eb339aae..4631e1e53 100644 --- a/consensus/msgs.go +++ b/consensus/msgs.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/cosmos/gogoproto/proto" + cstypes "github.com/tendermint/tendermint/consensus/types" "github.com/tendermint/tendermint/libs/bits" tmmath "github.com/tendermint/tendermint/libs/math" diff --git a/evidence/reactor.go b/evidence/reactor.go index 88357e25a..4211dcc8f 100644 --- a/evidence/reactor.go +++ b/evidence/reactor.go @@ -5,6 +5,7 @@ import ( "time" "github.com/cosmos/gogoproto/proto" + clist "github.com/tendermint/tendermint/libs/clist" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/p2p" diff --git a/libs/pubsub/query/query_test.go b/libs/pubsub/query/query_test.go index 71a05e239..2fbee91fb 100644 --- a/libs/pubsub/query/query_test.go +++ b/libs/pubsub/query/query_test.go @@ -9,6 +9,7 @@ import ( "time" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/pubsub" "github.com/tendermint/tendermint/libs/pubsub/query" diff --git a/p2p/switch.go b/p2p/switch.go index 6b7563a42..204ca46d6 100644 --- a/p2p/switch.go +++ b/p2p/switch.go @@ -7,6 +7,7 @@ import ( "time" "github.com/cosmos/gogoproto/proto" + "github.com/tendermint/tendermint/config" "github.com/tendermint/tendermint/libs/cmap" "github.com/tendermint/tendermint/libs/rand" diff --git a/p2p/transport.go b/p2p/transport.go index b5538ff18..0adb7e8be 100644 --- a/p2p/transport.go +++ b/p2p/transport.go @@ -9,6 +9,7 @@ import ( "golang.org/x/net/netutil" "github.com/cosmos/gogoproto/proto" + "github.com/tendermint/tendermint/crypto" "github.com/tendermint/tendermint/libs/protoio" "github.com/tendermint/tendermint/p2p/conn" diff --git a/p2p/types.go b/p2p/types.go index 48e295a2b..8610b376a 100644 --- a/p2p/types.go +++ b/p2p/types.go @@ -2,6 +2,7 @@ package p2p import ( "github.com/cosmos/gogoproto/proto" + "github.com/tendermint/tendermint/p2p/conn" tmp2p "github.com/tendermint/tendermint/proto/tendermint/p2p" ) diff --git a/proto/tendermint/blocksync/message.go b/proto/tendermint/blocksync/message.go index a38ee6ca0..4d55723b4 100644 --- a/proto/tendermint/blocksync/message.go +++ b/proto/tendermint/blocksync/message.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/cosmos/gogoproto/proto" + "github.com/tendermint/tendermint/p2p" ) diff --git a/proto/tendermint/consensus/message.go b/proto/tendermint/consensus/message.go index 90f95a725..89f6848fb 100644 --- a/proto/tendermint/consensus/message.go +++ b/proto/tendermint/consensus/message.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/cosmos/gogoproto/proto" + "github.com/tendermint/tendermint/p2p" ) diff --git a/proto/tendermint/mempool/message.go b/proto/tendermint/mempool/message.go index 341b62a03..63760cae3 100644 --- a/proto/tendermint/mempool/message.go +++ b/proto/tendermint/mempool/message.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/cosmos/gogoproto/proto" + "github.com/tendermint/tendermint/p2p" ) diff --git a/proto/tendermint/statesync/message.go b/proto/tendermint/statesync/message.go index f011b8ff6..cab635581 100644 --- a/proto/tendermint/statesync/message.go +++ b/proto/tendermint/statesync/message.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/cosmos/gogoproto/proto" + "github.com/tendermint/tendermint/p2p" ) diff --git a/state/execution_test.go b/state/execution_test.go index 3299413c9..8e1c69d63 100644 --- a/state/execution_test.go +++ b/state/execution_test.go @@ -10,6 +10,8 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + dbm "github.com/tendermint/tm-db" + abciclientmocks "github.com/tendermint/tendermint/abci/client/mocks" abci "github.com/tendermint/tendermint/abci/types" abcimocks "github.com/tendermint/tendermint/abci/types/mocks" @@ -29,7 +31,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" ) var ( diff --git a/state/indexer/block/kv/util.go b/state/indexer/block/kv/util.go index fff88046c..d53c26d38 100644 --- a/state/indexer/block/kv/util.go +++ b/state/indexer/block/kv/util.go @@ -6,6 +6,7 @@ import ( "strconv" "github.com/google/orderedcode" + "github.com/tendermint/tendermint/libs/pubsub/query/syntax" "github.com/tendermint/tendermint/types" ) diff --git a/state/validation_test.go b/state/validation_test.go index f99dfbd83..152eb1d74 100644 --- a/state/validation_test.go +++ b/state/validation_test.go @@ -8,6 +8,8 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" + dbm "github.com/tendermint/tm-db" + abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/ed25519" "github.com/tendermint/tendermint/crypto/tmhash" @@ -20,7 +22,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 validationTestsStopHeight int64 = 10 diff --git a/test/loadtime/cmd/load/main.go b/test/loadtime/cmd/load/main.go index 7eceaea7d..878a8c1c7 100644 --- a/test/loadtime/cmd/load/main.go +++ b/test/loadtime/cmd/load/main.go @@ -5,6 +5,7 @@ import ( "github.com/google/uuid" "github.com/informalsystems/tm-load-test/pkg/loadtest" + "github.com/tendermint/tendermint/test/loadtime/payload" ) diff --git a/test/loadtime/cmd/report/main.go b/test/loadtime/cmd/report/main.go index b92bf0ef5..cec5204da 100644 --- a/test/loadtime/cmd/report/main.go +++ b/test/loadtime/cmd/report/main.go @@ -9,9 +9,10 @@ import ( "strconv" "strings" + dbm "github.com/tendermint/tm-db" + "github.com/tendermint/tendermint/store" "github.com/tendermint/tendermint/test/loadtime/report" - dbm "github.com/tendermint/tm-db" ) var ( diff --git a/test/loadtime/payload/payload_test.go b/test/loadtime/payload/payload_test.go index ef2180c94..404144e9f 100644 --- a/test/loadtime/payload/payload_test.go +++ b/test/loadtime/payload/payload_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/google/uuid" + "github.com/tendermint/tendermint/test/loadtime/payload" ) diff --git a/test/loadtime/report/report.go b/test/loadtime/report/report.go index 269f63b2d..787926bc1 100644 --- a/test/loadtime/report/report.go +++ b/test/loadtime/report/report.go @@ -6,9 +6,10 @@ import ( "time" "github.com/gofrs/uuid" + "gonum.org/v1/gonum/stat" + "github.com/tendermint/tendermint/test/loadtime/payload" "github.com/tendermint/tendermint/types" - "gonum.org/v1/gonum/stat" ) // BlockStore defines the set of methods needed by the report generator from diff --git a/test/loadtime/report/report_test.go b/test/loadtime/report/report_test.go index aba4f51b0..af1dc79d5 100644 --- a/test/loadtime/report/report_test.go +++ b/test/loadtime/report/report_test.go @@ -5,10 +5,11 @@ import ( "time" "github.com/google/uuid" + "google.golang.org/protobuf/types/known/timestamppb" + "github.com/tendermint/tendermint/test/loadtime/payload" "github.com/tendermint/tendermint/test/loadtime/report" "github.com/tendermint/tendermint/types" - "google.golang.org/protobuf/types/known/timestamppb" ) type mockBlockStore struct {