diff --git a/.golangci.yml b/.golangci.yml index 018dcfb96..48628e03f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -2,13 +2,14 @@ run: concurrency: 4 deadline: 1m issues-exit-code: 1 + modules-download-mode: vendor tests: true skip-dirs: - static + - vendor skip-files: - bindata.go - .*_mock.go - - jail/doc.go - contracts/ output: @@ -26,6 +27,8 @@ linters-settings: min-confidence: 0.8 gofmt: simplify: true + goimports: + local-prefixes: github.com/ethereum/go-ethereum,github.com/status-im/status-go gocyclo: min-complexity: 16 maligned: @@ -44,7 +47,7 @@ linters: - gosec - goconst - gocyclo - - gofmt + - goimports - golint - govet - ineffassign diff --git a/Makefile b/Makefile index d8832ca1a..986b38625 100644 --- a/Makefile +++ b/Makefile @@ -177,7 +177,8 @@ clean-release: rm -rf $(RELEASE_DIR) gofmt: - find . -name '*.go' -and -not -name 'bindata*' -and -not -name 'migrations.go' -and -not -wholename '*/vendor/*' -exec gofmt -s -w {} \; + find . -name '*.go' -and -not -name 'bindata*' -and -not -name 'migrations.go' -and -not -wholename '*/vendor/*' -exec goimports -local 'github.com/ethereum/go-ethereum,github.com/status-im/status-go' -w {} \; + $(MAKE) vendor check-existing-release: @git ls-remote --exit-code origin "v$(RELEASE_TAG)" >/dev/null || exit 0; \ diff --git a/account/accounts_geth.go b/account/accounts_geth.go index e6ab82f38..59031a69b 100644 --- a/account/accounts_geth.go +++ b/account/accounts_geth.go @@ -4,6 +4,7 @@ package account import ( "github.com/ethereum/go-ethereum/accounts" + "github.com/status-im/status-go/account/generator" ) diff --git a/account/address_test.go b/account/address_test.go index e9dea6648..2cdc07424 100644 --- a/account/address_test.go +++ b/account/address_test.go @@ -3,9 +3,10 @@ package account import ( "testing" + "github.com/stretchr/testify/require" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" - "github.com/stretchr/testify/require" ) func TestCreateAddress(t *testing.T) { diff --git a/account/generator/generator.go b/account/generator/generator.go index 8d324f651..e62aa6462 100644 --- a/account/generator/generator.go +++ b/account/generator/generator.go @@ -7,8 +7,10 @@ import ( "strings" "sync" - "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/pborman/uuid" + + "github.com/ethereum/go-ethereum/accounts/keystore" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/extkeys" diff --git a/account/generator/generator_test.go b/account/generator/generator_test.go index cb12a46a4..130614385 100644 --- a/account/generator/generator_test.go +++ b/account/generator/generator_test.go @@ -5,8 +5,9 @@ import ( "strings" "testing" - "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/assert" + + "github.com/ethereum/go-ethereum/crypto" ) var testAccount = struct { diff --git a/account/generator/utils_test.go b/account/generator/utils_test.go index cf006c736..e98cec31d 100644 --- a/account/generator/utils_test.go +++ b/account/generator/utils_test.go @@ -3,10 +3,11 @@ package generator import ( "testing" - "github.com/status-im/status-go/eth-node/types" - "github.com/status-im/status-go/extkeys" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/status-im/status-go/eth-node/types" + "github.com/status-im/status-go/extkeys" ) func generateTestKey(t *testing.T) *extkeys.ExtendedKey { diff --git a/account/keystore_geth.go b/account/keystore_geth.go index cd54f4263..a4bebc660 100644 --- a/account/keystore_geth.go +++ b/account/keystore_geth.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts/keystore" + gethbridge "github.com/status-im/status-go/eth-node/bridge/geth" "github.com/status-im/status-go/eth-node/types" ) diff --git a/account/onboarding.go b/account/onboarding.go index f2fb2f458..885514715 100644 --- a/account/onboarding.go +++ b/account/onboarding.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/pborman/uuid" + "github.com/status-im/status-go/account/generator" "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" diff --git a/account/utils_test.go b/account/utils_test.go index c4cf5525d..8f3d8745c 100644 --- a/account/utils_test.go +++ b/account/utils_test.go @@ -4,12 +4,13 @@ package account import ( "testing" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/suite" + "github.com/status-im/status-go/account/generator" "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/extkeys" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/suite" ) type AccountUtilsTestSuite struct { diff --git a/api/backend_subs_test.go b/api/backend_subs_test.go index 54763b478..4e3739350 100644 --- a/api/backend_subs_test.go +++ b/api/backend_subs_test.go @@ -6,13 +6,14 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/status-im/status-go/account" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/node" "github.com/status-im/status-go/params" "github.com/status-im/status-go/signal" "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/require" ) const ( diff --git a/api/backend_test.go b/api/backend_test.go index 4c70282e8..f2bcad8bd 100644 --- a/api/backend_test.go +++ b/api/backend_test.go @@ -12,7 +12,11 @@ import ( "sync" "testing" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + gethcrypto "github.com/ethereum/go-ethereum/crypto" + "github.com/status-im/status-go/account" "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" @@ -24,8 +28,6 @@ import ( "github.com/status-im/status-go/services/typeddata" "github.com/status-im/status-go/t/utils" "github.com/status-im/status-go/transactions" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) var ( diff --git a/api/geth_backend.go b/api/geth_backend.go index c9b08d8a1..5eb6b1c8b 100644 --- a/api/geth_backend.go +++ b/api/geth_backend.go @@ -18,6 +18,7 @@ import ( "github.com/ethereum/go-ethereum/log" gethnode "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/p2p/enode" + "github.com/status-im/status-go/account" "github.com/status-im/status-go/appdatabase" "github.com/status-im/status-go/eth-node/crypto" diff --git a/api/utils_test.go b/api/utils_test.go index 353095d38..8fa9717f6 100644 --- a/api/utils_test.go +++ b/api/utils_test.go @@ -4,12 +4,13 @@ import ( "fmt" "testing" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/params" "github.com/status-im/status-go/services/personal" "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) func TestHashMessage(t *testing.T) { diff --git a/appdatabase/migrations/migrate.go b/appdatabase/migrations/migrate.go index 825e1ddfc..8757b0f1c 100644 --- a/appdatabase/migrations/migrate.go +++ b/appdatabase/migrations/migrate.go @@ -4,6 +4,7 @@ import ( "database/sql" bindata "github.com/status-im/migrate/v4/source/go_bindata" + "github.com/status-im/status-go/sqlite" ) diff --git a/cmd/node-canary/main.go b/cmd/node-canary/main.go index ad79bbe0b..ab1441b3d 100644 --- a/cmd/node-canary/main.go +++ b/cmd/node-canary/main.go @@ -12,9 +12,13 @@ import ( "path/filepath" "time" + "golang.org/x/crypto/sha3" + "golang.org/x/crypto/ssh/terminal" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" + "github.com/status-im/status-go/api" gethbridge "github.com/status-im/status-go/eth-node/bridge/geth" "github.com/status-im/status-go/eth-node/types" @@ -23,8 +27,6 @@ import ( "github.com/status-im/status-go/rpc" "github.com/status-im/status-go/services/shhext" "github.com/status-im/status-go/t/helpers" - "golang.org/x/crypto/sha3" - "golang.org/x/crypto/ssh/terminal" ) const ( diff --git a/cmd/statusd/flags_test.go b/cmd/statusd/flags_test.go index dac76efcc..4331e1c73 100644 --- a/cmd/statusd/flags_test.go +++ b/cmd/statusd/flags_test.go @@ -4,8 +4,9 @@ import ( "fmt" "testing" - "github.com/status-im/status-go/params" "github.com/stretchr/testify/require" + + "github.com/status-im/status-go/params" ) // nolint: deadcode diff --git a/cmd/statusd/main.go b/cmd/statusd/main.go index 920b5008c..752b83ef2 100644 --- a/cmd/statusd/main.go +++ b/cmd/statusd/main.go @@ -13,9 +13,12 @@ import ( "strings" "time" + "github.com/okzk/sdnotify" + "golang.org/x/crypto/ssh/terminal" + "github.com/ethereum/go-ethereum/log" gethmetrics "github.com/ethereum/go-ethereum/metrics" - "github.com/okzk/sdnotify" + "github.com/status-im/status-go/api" "github.com/status-im/status-go/logutils" "github.com/status-im/status-go/metrics" @@ -23,7 +26,6 @@ import ( "github.com/status-im/status-go/node" "github.com/status-im/status-go/params" "github.com/status-im/status-go/profiling" - "golang.org/x/crypto/ssh/terminal" ) const ( diff --git a/cmd/statusd/topics/topics.go b/cmd/statusd/topics/topics.go index f2baa562e..05ba080b5 100644 --- a/cmd/statusd/topics/topics.go +++ b/cmd/statusd/topics/topics.go @@ -6,6 +6,7 @@ import ( "strings" "github.com/ethereum/go-ethereum/p2p/discv5" + "github.com/status-im/status-go/params" ) diff --git a/cmd/statusd/topics/topics_test.go b/cmd/statusd/topics/topics_test.go index f606adaf1..ec41593da 100644 --- a/cmd/statusd/topics/topics_test.go +++ b/cmd/statusd/topics/topics_test.go @@ -3,8 +3,9 @@ package topics import ( "testing" - "github.com/status-im/status-go/params" "github.com/stretchr/testify/assert" + + "github.com/status-im/status-go/params" ) func TestTopicFlags(t *testing.T) { diff --git a/contracts/ens/ens.go b/contracts/ens/ens.go index b40427144..16c94cd2a 100644 --- a/contracts/ens/ens.go +++ b/contracts/ens/ens.go @@ -27,6 +27,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/status-im/status-go/contracts/ens/contract" ) diff --git a/contracts/ens/ens_test.go b/contracts/ens/ens_test.go index 641c4437f..870d71b6c 100644 --- a/contracts/ens/ens_test.go +++ b/contracts/ens/ens_test.go @@ -25,6 +25,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/crypto" + "github.com/status-im/status-go/contracts/ens/contract" ) diff --git a/db/db.go b/db/db.go index 9e9a3b1da..498cda3da 100644 --- a/db/db.go +++ b/db/db.go @@ -3,13 +3,14 @@ package db import ( "path/filepath" - "github.com/ethereum/go-ethereum/log" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/errors" "github.com/syndtr/goleveldb/leveldb/iterator" "github.com/syndtr/goleveldb/leveldb/opt" "github.com/syndtr/goleveldb/leveldb/storage" "github.com/syndtr/goleveldb/leveldb/util" + + "github.com/ethereum/go-ethereum/log" ) type storagePrefix byte diff --git a/db/history.go b/db/history.go index 702a353ed..f0d7a5cf0 100644 --- a/db/history.go +++ b/db/history.go @@ -6,8 +6,9 @@ import ( "errors" "time" - "github.com/status-im/status-go/eth-node/types" "github.com/syndtr/goleveldb/leveldb/util" + + "github.com/status-im/status-go/eth-node/types" ) var ( diff --git a/db/history_store.go b/db/history_store.go index 46c7d7089..420a1e382 100644 --- a/db/history_store.go +++ b/db/history_store.go @@ -3,8 +3,9 @@ package db import ( "time" - "github.com/status-im/status-go/eth-node/types" "github.com/syndtr/goleveldb/leveldb/errors" + + "github.com/status-im/status-go/eth-node/types" ) // NewHistoryStore returns HistoryStore instance. diff --git a/db/history_store_test.go b/db/history_store_test.go index d98f6818d..f09d428ff 100644 --- a/db/history_store_test.go +++ b/db/history_store_test.go @@ -4,8 +4,9 @@ import ( "testing" "time" - "github.com/status-im/status-go/eth-node/types" "github.com/stretchr/testify/require" + + "github.com/status-im/status-go/eth-node/types" ) func createInMemStore(t *testing.T) HistoryStore { diff --git a/db/history_test.go b/db/history_test.go index cc0d77aaf..8ac95945d 100644 --- a/db/history_test.go +++ b/db/history_test.go @@ -4,8 +4,9 @@ import ( "testing" "time" - "github.com/status-im/status-go/eth-node/types" "github.com/stretchr/testify/require" + + "github.com/status-im/status-go/eth-node/types" ) func TestTopicHistoryStoreLoadFromKey(t *testing.T) { diff --git a/discovery/muxer_test.go b/discovery/muxer_test.go index ed1805319..2c3161477 100644 --- a/discovery/muxer_test.go +++ b/discovery/muxer_test.go @@ -6,8 +6,9 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/p2p/discv5" "github.com/stretchr/testify/require" + + "github.com/ethereum/go-ethereum/p2p/discv5" ) func newRegistry() *registry { diff --git a/discovery/rendezvous.go b/discovery/rendezvous.go index 2a88ff588..898396b47 100644 --- a/discovery/rendezvous.go +++ b/discovery/rendezvous.go @@ -9,12 +9,13 @@ import ( "sync" "time" + ma "github.com/multiformats/go-multiaddr" + "github.com/status-im/rendezvous" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p/discv5" "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enr" - ma "github.com/multiformats/go-multiaddr" - "github.com/status-im/rendezvous" ) const ( diff --git a/discovery/rendezvous_test.go b/discovery/rendezvous_test.go index aa55f91ae..7251f72b1 100644 --- a/discovery/rendezvous_test.go +++ b/discovery/rendezvous_test.go @@ -5,10 +5,6 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/p2p/discv5" - "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/ethereum/go-ethereum/p2p/enr" lcrypto "github.com/libp2p/go-libp2p-core/crypto" ma "github.com/multiformats/go-multiaddr" "github.com/status-im/rendezvous/server" @@ -16,6 +12,11 @@ import ( "github.com/stretchr/testify/require" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/storage" + + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/p2p/discv5" + "github.com/ethereum/go-ethereum/p2p/enode" + "github.com/ethereum/go-ethereum/p2p/enr" ) func makeTestRendezvousServer(t *testing.T, addr string) *server.Server { diff --git a/eth-node/bridge/geth/ens/ens.go b/eth-node/bridge/geth/ens/ens.go index 18f6e0e92..ef6196c48 100644 --- a/eth-node/bridge/geth/ens/ens.go +++ b/eth-node/bridge/geth/ens/ens.go @@ -8,11 +8,13 @@ import ( "math/big" "time" - "github.com/ethereum/go-ethereum/ethclient" - "github.com/status-im/status-go/eth-node/crypto" - enstypes "github.com/status-im/status-go/eth-node/types/ens" ens "github.com/wealdtech/go-ens/v3" "go.uber.org/zap" + + "github.com/ethereum/go-ethereum/ethclient" + + "github.com/status-im/status-go/eth-node/crypto" + enstypes "github.com/status-im/status-go/eth-node/types/ens" ) const ( diff --git a/eth-node/bridge/geth/keystore.go b/eth-node/bridge/geth/keystore.go index af12dc068..85cd4e92f 100644 --- a/eth-node/bridge/geth/keystore.go +++ b/eth-node/bridge/geth/keystore.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/common" + "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/extkeys" ) diff --git a/eth-node/bridge/geth/node.go b/eth-node/bridge/geth/node.go index c07043b39..7cfa42b71 100644 --- a/eth-node/bridge/geth/node.go +++ b/eth-node/bridge/geth/node.go @@ -1,13 +1,15 @@ package gethbridge import ( + "go.uber.org/zap" + "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/p2p/enode" + gethens "github.com/status-im/status-go/eth-node/bridge/geth/ens" "github.com/status-im/status-go/eth-node/types" enstypes "github.com/status-im/status-go/eth-node/types/ens" "github.com/status-im/status-go/whisper/v6" - "go.uber.org/zap" ) type gethNodeWrapper struct { diff --git a/eth-node/bridge/geth/public_whisper_api.go b/eth-node/bridge/geth/public_whisper_api.go index d26ba6dc4..c99c8445d 100644 --- a/eth-node/bridge/geth/public_whisper_api.go +++ b/eth-node/bridge/geth/public_whisper_api.go @@ -4,6 +4,7 @@ import ( "context" "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/whisper/v6" ) diff --git a/eth-node/bridge/geth/subscription.go b/eth-node/bridge/geth/subscription.go index 7e707f0a3..f6cfb852e 100644 --- a/eth-node/bridge/geth/subscription.go +++ b/eth-node/bridge/geth/subscription.go @@ -2,6 +2,7 @@ package gethbridge import ( "github.com/ethereum/go-ethereum/event" + "github.com/status-im/status-go/eth-node/types" ) diff --git a/eth-node/bridge/nimbus/node.go b/eth-node/bridge/nimbus/node.go index 3c2762cda..9e058aa08 100644 --- a/eth-node/bridge/nimbus/node.go +++ b/eth-node/bridge/nimbus/node.go @@ -24,10 +24,11 @@ import ( "time" "unsafe" + "go.uber.org/zap" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" enstypes "github.com/status-im/status-go/eth-node/types/ens" - "go.uber.org/zap" ) type nimbusNodeWrapper struct { diff --git a/eth-node/bridge/nimbus/whisper.go b/eth-node/bridge/nimbus/whisper.go index bf069bc24..bad9cb3d5 100644 --- a/eth-node/bridge/nimbus/whisper.go +++ b/eth-node/bridge/nimbus/whisper.go @@ -24,6 +24,7 @@ import ( "unsafe" gopointer "github.com/mattn/go-pointer" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" ) diff --git a/eth-node/crypto/crypto_test.go b/eth-node/crypto/crypto_test.go index d267a5f9f..86b09657f 100644 --- a/eth-node/crypto/crypto_test.go +++ b/eth-node/crypto/crypto_test.go @@ -2,8 +2,9 @@ package crypto import ( "encoding/hex" - "github.com/stretchr/testify/require" "testing" + + "github.com/stretchr/testify/require" ) func TestExtractSignatures(t *testing.T) { diff --git a/eth-node/crypto/ethereum_crypto.go b/eth-node/crypto/ethereum_crypto.go index 69a282cba..f4007a4e4 100644 --- a/eth-node/crypto/ethereum_crypto.go +++ b/eth-node/crypto/ethereum_crypto.go @@ -10,8 +10,9 @@ import ( "io" dr "github.com/status-im/doubleratchet" - "github.com/status-im/status-go/eth-node/crypto/ecies" "golang.org/x/crypto/hkdf" + + "github.com/status-im/status-go/eth-node/crypto/ecies" ) // EthereumCrypto is an implementation of Crypto with cryptographic primitives recommended diff --git a/eth-node/crypto/gethcrypto.go b/eth-node/crypto/gethcrypto.go index 634484fce..f87982965 100644 --- a/eth-node/crypto/gethcrypto.go +++ b/eth-node/crypto/gethcrypto.go @@ -28,11 +28,13 @@ import ( "math/big" "os" + "golang.org/x/crypto/sha3" + "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/crypto/secp256k1" "github.com/ethereum/go-ethereum/rlp" + "github.com/status-im/status-go/eth-node/types" - "golang.org/x/crypto/sha3" ) //SignatureLength indicates the byte length required to carry a signature with recovery id. diff --git a/eth-node/keystore/passphrase.go b/eth-node/keystore/passphrase.go index 36d8a5755..b13f546aa 100644 --- a/eth-node/keystore/passphrase.go +++ b/eth-node/keystore/passphrase.go @@ -13,11 +13,12 @@ import ( "fmt" "github.com/pborman/uuid" + "golang.org/x/crypto/pbkdf2" + "golang.org/x/crypto/scrypt" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/extkeys" - "golang.org/x/crypto/pbkdf2" - "golang.org/x/crypto/scrypt" ) const ( diff --git a/eth-node/types/key.go b/eth-node/types/key.go index be2e83c0d..c0fded848 100644 --- a/eth-node/types/key.go +++ b/eth-node/types/key.go @@ -4,6 +4,7 @@ import ( "crypto/ecdsa" "github.com/pborman/uuid" + "github.com/status-im/status-go/extkeys" ) diff --git a/eth-node/types/node.go b/eth-node/types/node.go index 4568258fb..20f3aead6 100644 --- a/eth-node/types/node.go +++ b/eth-node/types/node.go @@ -3,8 +3,9 @@ package types import ( "fmt" - enstypes "github.com/status-im/status-go/eth-node/types/ens" "go.uber.org/zap" + + enstypes "github.com/status-im/status-go/eth-node/types/ens" ) // EnodeID is a unique identifier for each node. diff --git a/extkeys/hdkey_test.go b/extkeys/hdkey_test.go index 578c36e11..00476d1e3 100644 --- a/extkeys/hdkey_test.go +++ b/extkeys/hdkey_test.go @@ -9,6 +9,7 @@ import ( "testing" "github.com/btcsuite/btcd/chaincfg" + "github.com/ethereum/go-ethereum/crypto" ) diff --git a/lib/library.go b/lib/library.go index 3dee2c5ba..1d23a68db 100644 --- a/lib/library.go +++ b/lib/library.go @@ -10,6 +10,8 @@ import ( "os" "unsafe" + validator "gopkg.in/go-playground/validator.v9" + "github.com/status-im/status-go/api" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/exportlogs" @@ -23,7 +25,6 @@ import ( "github.com/status-im/status-go/services/typeddata" "github.com/status-im/status-go/signal" "github.com/status-im/status-go/transactions" - validator "gopkg.in/go-playground/validator.v9" ) // OpenAccounts opens database and returns accounts list. diff --git a/lib/library_test.go b/lib/library_test.go index 4d31d47c9..e5d188fd1 100644 --- a/lib/library_test.go +++ b/lib/library_test.go @@ -13,9 +13,10 @@ import ( "strconv" "testing" - . "github.com/status-im/status-go/t/utils" //nolint: golint "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + . "github.com/status-im/status-go/t/utils" //nolint: golint ) func TestMain(m *testing.M) { diff --git a/lib/library_test_multiaccount.go b/lib/library_test_multiaccount.go index b683256fb..bcb7f6e36 100644 --- a/lib/library_test_multiaccount.go +++ b/lib/library_test_multiaccount.go @@ -15,6 +15,7 @@ import ( "testing" "github.com/ethereum/go-ethereum/event" + "github.com/status-im/status-go/account/generator" ) diff --git a/lib/library_test_utils.go b/lib/library_test_utils.go index 234bfff1b..94d06fb99 100644 --- a/lib/library_test_utils.go +++ b/lib/library_test_utils.go @@ -23,8 +23,11 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/event" + "github.com/status-im/status-go/account" "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/keystore" @@ -33,7 +36,6 @@ import ( "github.com/status-im/status-go/signal" . "github.com/status-im/status-go/t/utils" //nolint: golint "github.com/status-im/status-go/transactions" - "github.com/stretchr/testify/require" ) var ( diff --git a/lib/response.go b/lib/response.go index adb44811b..2476d40ed 100644 --- a/lib/response.go +++ b/lib/response.go @@ -4,6 +4,7 @@ import ( "encoding/json" "github.com/ethereum/go-ethereum/accounts/keystore" + "github.com/status-im/status-go/account" "github.com/status-im/status-go/transactions" ) diff --git a/logutils/logrotation.go b/logutils/logrotation.go index 7f265ad84..4a68d92c4 100644 --- a/logutils/logrotation.go +++ b/logutils/logrotation.go @@ -1,8 +1,9 @@ package logutils import ( - "github.com/ethereum/go-ethereum/log" lumberjack "gopkg.in/natefinch/lumberjack.v2" + + "github.com/ethereum/go-ethereum/log" ) // FileOptions are all options supported by internal rotation module. diff --git a/logutils/override.go b/logutils/override.go index dd5283066..33c667905 100644 --- a/logutils/override.go +++ b/logutils/override.go @@ -5,6 +5,7 @@ import ( "strings" "github.com/ethereum/go-ethereum/log" + "github.com/status-im/status-go/params" ) diff --git a/logutils/zap_adapter.go b/logutils/zap_adapter.go index 1b25e2664..518e90225 100644 --- a/logutils/zap_adapter.go +++ b/logutils/zap_adapter.go @@ -2,13 +2,15 @@ package logutils import ( "fmt" - "github.com/ethereum/go-ethereum/log" - "go.uber.org/zap" - "go.uber.org/zap/zapcore" "math" "sync" "time" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" + + "github.com/ethereum/go-ethereum/log" + "github.com/status-im/status-go/protocol/zaputil" ) diff --git a/logutils/zap_adapter_test.go b/logutils/zap_adapter_test.go index 77f84927c..755046f82 100644 --- a/logutils/zap_adapter_test.go +++ b/logutils/zap_adapter_test.go @@ -3,10 +3,12 @@ package logutils import ( "bytes" "errors" - "github.com/ethereum/go-ethereum/log" + "testing" + "github.com/stretchr/testify/require" "go.uber.org/zap" - "testing" + + "github.com/ethereum/go-ethereum/log" ) func TestNewZapAdapter(t *testing.T) { diff --git a/mailserver/cleaner_test.go b/mailserver/cleaner_test.go index 883a3c3ec..ce91d028b 100644 --- a/mailserver/cleaner_test.go +++ b/mailserver/cleaner_test.go @@ -5,12 +5,14 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/rlp" - "github.com/status-im/status-go/eth-node/types" - "github.com/status-im/status-go/whisper/v6" "github.com/stretchr/testify/require" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/storage" + + "github.com/ethereum/go-ethereum/rlp" + + "github.com/status-im/status-go/eth-node/types" + "github.com/status-im/status-go/whisper/v6" ) func TestCleaner(t *testing.T) { diff --git a/mailserver/db_key_test.go b/mailserver/db_key_test.go index 18a7070e4..c681a7147 100644 --- a/mailserver/db_key_test.go +++ b/mailserver/db_key_test.go @@ -3,8 +3,9 @@ package mailserver import ( "testing" - "github.com/status-im/status-go/eth-node/types" "github.com/stretchr/testify/require" + + "github.com/status-im/status-go/eth-node/types" ) func TestNewDBKey(t *testing.T) { diff --git a/mailserver/mailserver.go b/mailserver/mailserver.go index cc9bbca25..174b0564d 100644 --- a/mailserver/mailserver.go +++ b/mailserver/mailserver.go @@ -29,6 +29,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rlp" + "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/params" "github.com/status-im/status-go/whisper/v6" diff --git a/mailserver/mailserver_db_leveldb.go b/mailserver/mailserver_db_leveldb.go index 4f742b5b4..395547f37 100644 --- a/mailserver/mailserver_db_leveldb.go +++ b/mailserver/mailserver_db_leveldb.go @@ -4,15 +4,17 @@ import ( "fmt" "time" - "github.com/ethereum/go-ethereum/log" - "github.com/ethereum/go-ethereum/rlp" - "github.com/status-im/status-go/eth-node/types" - "github.com/status-im/status-go/params" - "github.com/status-im/status-go/whisper/v6" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/errors" "github.com/syndtr/goleveldb/leveldb/iterator" "github.com/syndtr/goleveldb/leveldb/util" + + "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/rlp" + + "github.com/status-im/status-go/eth-node/types" + "github.com/status-im/status-go/params" + "github.com/status-im/status-go/whisper/v6" ) type LevelDB struct { diff --git a/mailserver/mailserver_db_postgres.go b/mailserver/mailserver_db_postgres.go index 6210d7454..60b57d210 100644 --- a/mailserver/mailserver_db_postgres.go +++ b/mailserver/mailserver_db_postgres.go @@ -10,11 +10,13 @@ import ( "github.com/status-im/migrate/v4" "github.com/status-im/migrate/v4/database/postgres" bindata "github.com/status-im/migrate/v4/source/go_bindata" + "github.com/status-im/status-go/mailserver/migrations" "github.com/status-im/status-go/params" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rlp" + "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/whisper/v6" ) diff --git a/mailserver/mailserver_test.go b/mailserver/mailserver_test.go index 5206e3a2e..00a3c298b 100644 --- a/mailserver/mailserver_test.go +++ b/mailserver/mailserver_test.go @@ -29,13 +29,15 @@ import ( "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/rlp" + "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/params" "github.com/status-im/status-go/whisper/v6" - "github.com/stretchr/testify/suite" ) const powRequirement = 0.00001 diff --git a/mailserver/registry/verifier_test.go b/mailserver/registry/verifier_test.go index 08e345f37..bdc8f2423 100644 --- a/mailserver/registry/verifier_test.go +++ b/mailserver/registry/verifier_test.go @@ -7,13 +7,14 @@ import ( "math/big" "testing" + "github.com/stretchr/testify/suite" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/stretchr/testify/suite" ) type VerifierTestSuite struct { diff --git a/metrics/node/metrics_test.go b/metrics/node/metrics_test.go index a77a8af9f..f91c3d79a 100644 --- a/metrics/node/metrics_test.go +++ b/metrics/node/metrics_test.go @@ -3,9 +3,10 @@ package node import ( "testing" + "github.com/stretchr/testify/require" + "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/p2p" - "github.com/stretchr/testify/require" prom "github.com/prometheus/client_golang/prometheus" ) diff --git a/metrics/node/subscribe_test.go b/metrics/node/subscribe_test.go index d5fd27dc1..32912387b 100644 --- a/metrics/node/subscribe_test.go +++ b/metrics/node/subscribe_test.go @@ -4,8 +4,9 @@ import ( "context" "testing" - "github.com/ethereum/go-ethereum/node" "github.com/stretchr/testify/require" + + "github.com/ethereum/go-ethereum/node" ) func TestSubscribeServerEventsWithoutServer(t *testing.T) { diff --git a/mobile/response.go b/mobile/response.go index 0614214c7..8f00c39cb 100644 --- a/mobile/response.go +++ b/mobile/response.go @@ -4,6 +4,7 @@ import ( "encoding/json" "github.com/ethereum/go-ethereum/accounts/keystore" + "github.com/status-im/status-go/account" "github.com/status-im/status-go/transactions" ) diff --git a/mobile/status.go b/mobile/status.go index 839274d58..0563dead4 100644 --- a/mobile/status.go +++ b/mobile/status.go @@ -8,7 +8,10 @@ import ( "os" "unsafe" + validator "gopkg.in/go-playground/validator.v9" + "github.com/ethereum/go-ethereum/log" + "github.com/status-im/status-go/api" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/exportlogs" @@ -22,7 +25,6 @@ import ( "github.com/status-im/status-go/services/typeddata" "github.com/status-im/status-go/signal" "github.com/status-im/status-go/transactions" - validator "gopkg.in/go-playground/validator.v9" ) var statusBackend = api.NewGethStatusBackend() diff --git a/multiaccounts/accounts/database_test.go b/multiaccounts/accounts/database_test.go index d1f67c823..6d26761ba 100644 --- a/multiaccounts/accounts/database_test.go +++ b/multiaccounts/accounts/database_test.go @@ -7,10 +7,11 @@ import ( "os" "testing" + "github.com/stretchr/testify/require" + "github.com/status-im/status-go/appdatabase" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/params" - "github.com/stretchr/testify/require" ) var ( diff --git a/multiaccounts/migrations/migrate.go b/multiaccounts/migrations/migrate.go index 825e1ddfc..8757b0f1c 100644 --- a/multiaccounts/migrations/migrate.go +++ b/multiaccounts/migrations/migrate.go @@ -4,6 +4,7 @@ import ( "database/sql" bindata "github.com/status-im/migrate/v4/source/go_bindata" + "github.com/status-im/status-go/sqlite" ) diff --git a/node/node.go b/node/node.go index 4aa865a3c..cda02b22d 100644 --- a/node/node.go +++ b/node/node.go @@ -9,6 +9,8 @@ import ( "path/filepath" "time" + "github.com/syndtr/goleveldb/leveldb" + "github.com/ethereum/go-ethereum/accounts" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" @@ -22,6 +24,7 @@ import ( "github.com/ethereum/go-ethereum/p2p/discv5" "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/nat" + gethbridge "github.com/status-im/status-go/eth-node/bridge/geth" "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/mailserver" @@ -35,7 +38,6 @@ import ( "github.com/status-im/status-go/static" "github.com/status-im/status-go/timesource" "github.com/status-im/status-go/whisper/v6" - "github.com/syndtr/goleveldb/leveldb" ) // Errors related to node and services creation. diff --git a/node/node_api_test.go b/node/node_api_test.go index e8d0e74f2..04c5e9a8c 100644 --- a/node/node_api_test.go +++ b/node/node_api_test.go @@ -5,9 +5,10 @@ import ( "github.com/ethereum/go-ethereum/accounts" + "github.com/stretchr/testify/require" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/whisper/v6" - "github.com/stretchr/testify/require" ) func TestWhisperLightModeEnabledSetsEmptyBloomFilter(t *testing.T) { diff --git a/node/node_test.go b/node/node_test.go index af8aae581..9dce87e17 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -4,14 +4,16 @@ import ( "net" "testing" - "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/status-im/status-go/params" - "github.com/status-im/status-go/t/utils" "github.com/stretchr/testify/require" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/storage" + + "github.com/ethereum/go-ethereum/accounts" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/p2p/enode" + + "github.com/status-im/status-go/params" + "github.com/status-im/status-go/t/utils" ) var enode1 = "enode://f32efef2739e5135a0f9a80600b321ba4d13393a5f1d3f5f593df85919262f06c70bfa66d38507b9d79a91021f5e200ec20150592e72934c66248e87014c4317@1.1.1.1:30404" diff --git a/node/status_node.go b/node/status_node.go index 6e398bda4..d55ba4d0f 100644 --- a/node/status_node.go +++ b/node/status_node.go @@ -12,6 +12,9 @@ import ( "sync" "time" + ma "github.com/multiformats/go-multiaddr" + "github.com/syndtr/goleveldb/leveldb" + "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/les" "github.com/ethereum/go-ethereum/log" @@ -19,9 +22,8 @@ import ( "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enr" - ma "github.com/multiformats/go-multiaddr" + "github.com/status-im/status-go/whisper/v6" - "github.com/syndtr/goleveldb/leveldb" "github.com/status-im/status-go/db" "github.com/status-im/status-go/discovery" diff --git a/node/status_node_test.go b/node/status_node_test.go index 78dc59b39..d0bb1ee6e 100644 --- a/node/status_node_test.go +++ b/node/status_node_test.go @@ -17,13 +17,15 @@ import ( gethnode "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" + "github.com/status-im/status-go/whisper/v6" + "github.com/stretchr/testify/require" + "github.com/status-im/status-go/discovery" "github.com/status-im/status-go/params" "github.com/status-im/status-go/t/helpers" "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/require" ) func TestStatusNodeStart(t *testing.T) { diff --git a/params/config.go b/params/config.go index e616c4d56..78e541309 100644 --- a/params/config.go +++ b/params/config.go @@ -11,14 +11,16 @@ import ( "strings" "time" + validator "gopkg.in/go-playground/validator.v9" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p/discv5" "github.com/ethereum/go-ethereum/params" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/static" "github.com/status-im/status-go/whisper/v6" - validator "gopkg.in/go-playground/validator.v9" ) // ---------- diff --git a/params/config_test.go b/params/config_test.go index 7dbfd2b90..fd5f99f6f 100644 --- a/params/config_test.go +++ b/params/config_test.go @@ -9,11 +9,13 @@ import ( validator "gopkg.in/go-playground/validator.v9" - "github.com/ethereum/go-ethereum/p2p/discv5" - "github.com/status-im/status-go/params" - "github.com/status-im/status-go/t/utils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/ethereum/go-ethereum/p2p/discv5" + + "github.com/status-im/status-go/params" + "github.com/status-im/status-go/t/utils" ) func TestNewNodeConfigWithDefaults(t *testing.T) { diff --git a/peers/cache.go b/peers/cache.go index a93a5db8e..f99e80719 100644 --- a/peers/cache.go +++ b/peers/cache.go @@ -1,12 +1,14 @@ package peers import ( + "github.com/syndtr/goleveldb/leveldb" + "github.com/syndtr/goleveldb/leveldb/util" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p/discv5" "github.com/ethereum/go-ethereum/p2p/enode" + "github.com/status-im/status-go/db" - "github.com/syndtr/goleveldb/leveldb" - "github.com/syndtr/goleveldb/leveldb/util" ) // NewCache returns instance of PeersDatabase diff --git a/peers/cache_test.go b/peers/cache_test.go index 7fbc75c2b..ee80a6c2c 100644 --- a/peers/cache_test.go +++ b/peers/cache_test.go @@ -6,12 +6,13 @@ import ( "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/p2p/discv5" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/storage" + + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/p2p/discv5" ) func TestPeersRange(t *testing.T) { diff --git a/peers/cotopicpool.go b/peers/cotopicpool.go index 59a6cfd9f..b4d694cfe 100644 --- a/peers/cotopicpool.go +++ b/peers/cotopicpool.go @@ -5,6 +5,7 @@ import ( "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/signal" ) diff --git a/peers/cotopicpool_test.go b/peers/cotopicpool_test.go index b8dda8560..16285d144 100644 --- a/peers/cotopicpool_test.go +++ b/peers/cotopicpool_test.go @@ -5,13 +5,15 @@ import ( "testing" "time" + "github.com/stretchr/testify/suite" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/discv5" "github.com/ethereum/go-ethereum/p2p/enode" + "github.com/status-im/status-go/params" - "github.com/stretchr/testify/suite" ) type CacheOnlyTopicPoolSuite struct { diff --git a/peers/peerpool_test.go b/peers/peerpool_test.go index 7d93980e4..d8b8b8b26 100644 --- a/peers/peerpool_test.go +++ b/peers/peerpool_test.go @@ -8,11 +8,6 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/p2p" - "github.com/ethereum/go-ethereum/p2p/discv5" - "github.com/ethereum/go-ethereum/p2p/enode" lcrypto "github.com/libp2p/go-libp2p-core/crypto" ma "github.com/multiformats/go-multiaddr" "github.com/stretchr/testify/assert" @@ -21,7 +16,14 @@ import ( "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/storage" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/p2p" + "github.com/ethereum/go-ethereum/p2p/discv5" + "github.com/ethereum/go-ethereum/p2p/enode" + "github.com/status-im/rendezvous/server" + "github.com/status-im/status-go/discovery" "github.com/status-im/status-go/params" "github.com/status-im/status-go/signal" diff --git a/peers/signal.go b/peers/signal.go index e4655f8aa..d9809d558 100644 --- a/peers/signal.go +++ b/peers/signal.go @@ -2,6 +2,7 @@ package peers import ( "github.com/ethereum/go-ethereum/p2p" + "github.com/status-im/status-go/signal" ) diff --git a/peers/topic_register.go b/peers/topic_register.go index cceb610d3..d5f3b6189 100644 --- a/peers/topic_register.go +++ b/peers/topic_register.go @@ -5,6 +5,7 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p/discv5" + "github.com/status-im/status-go/discovery" ) diff --git a/peers/topicpool.go b/peers/topicpool.go index b467d1a05..37473b93f 100644 --- a/peers/topicpool.go +++ b/peers/topicpool.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/discv5" "github.com/ethereum/go-ethereum/p2p/enode" + "github.com/status-im/status-go/discovery" "github.com/status-im/status-go/params" ) diff --git a/peers/topicpool_test.go b/peers/topicpool_test.go index 46efc49e5..89f030a82 100644 --- a/peers/topicpool_test.go +++ b/peers/topicpool_test.go @@ -5,17 +5,19 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/mclock" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/discv5" "github.com/ethereum/go-ethereum/p2p/enode" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/t/helpers" "github.com/status-im/status-go/whisper/v6" - "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" ) type TopicPoolSuite struct { diff --git a/peers/verifier/verifier_test.go b/peers/verifier/verifier_test.go index e91b0d202..5ecf78737 100644 --- a/peers/verifier/verifier_test.go +++ b/peers/verifier/verifier_test.go @@ -4,8 +4,9 @@ import ( "context" "testing" - "github.com/ethereum/go-ethereum/p2p/enode" "github.com/stretchr/testify/require" + + "github.com/ethereum/go-ethereum/p2p/enode" ) func TestLocalVerifierForNodeIDTypes(t *testing.T) { diff --git a/protocol/applicationmetadata/message.pb.go b/protocol/applicationmetadata/message.pb.go index 4e71857d8..646d27629 100644 --- a/protocol/applicationmetadata/message.pb.go +++ b/protocol/applicationmetadata/message.pb.go @@ -5,8 +5,9 @@ package applicationmetadata import ( fmt "fmt" - proto "github.com/golang/protobuf/proto" math "math" + + proto "github.com/golang/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/protocol/applicationmetadata/pubkey.go b/protocol/applicationmetadata/pubkey.go index 92e5d9b56..29a152598 100644 --- a/protocol/applicationmetadata/pubkey.go +++ b/protocol/applicationmetadata/pubkey.go @@ -2,6 +2,7 @@ package applicationmetadata import ( "crypto/ecdsa" + "github.com/status-im/status-go/eth-node/crypto" ) diff --git a/protocol/datasync/datasync.go b/protocol/datasync/datasync.go index 835a40ebd..a620860ae 100644 --- a/protocol/datasync/datasync.go +++ b/protocol/datasync/datasync.go @@ -4,11 +4,12 @@ import ( "crypto/ecdsa" "github.com/golang/protobuf/proto" - datasyncpeer "github.com/status-im/status-go/protocol/datasync/peer" datasyncnode "github.com/vacp2p/mvds/node" datasyncproto "github.com/vacp2p/mvds/protobuf" datasynctransport "github.com/vacp2p/mvds/transport" "go.uber.org/zap" + + datasyncpeer "github.com/status-im/status-go/protocol/datasync/peer" ) type DataSync struct { diff --git a/protocol/datasync/transport.go b/protocol/datasync/transport.go index 7aaac0c68..f193870df 100644 --- a/protocol/datasync/transport.go +++ b/protocol/datasync/transport.go @@ -4,11 +4,13 @@ import ( "context" "crypto/ecdsa" "errors" + "github.com/golang/protobuf/proto" - datasyncpeer "github.com/status-im/status-go/protocol/datasync/peer" "github.com/vacp2p/mvds/protobuf" "github.com/vacp2p/mvds/state" "github.com/vacp2p/mvds/transport" + + datasyncpeer "github.com/status-im/status-go/protocol/datasync/peer" ) var errNotInitialized = errors.New("Datasync transport not initialized") diff --git a/protocol/datasync/utils.go b/protocol/datasync/utils.go index e9f9c5c1a..99cdc3e31 100644 --- a/protocol/datasync/utils.go +++ b/protocol/datasync/utils.go @@ -2,8 +2,10 @@ package datasync import ( "crypto/ecdsa" - "github.com/status-im/status-go/eth-node/crypto" + "github.com/vacp2p/mvds/state" + + "github.com/status-im/status-go/eth-node/crypto" ) func ToGroupID(data []byte) state.GroupID { diff --git a/protocol/encryption/encryption_multi_device_test.go b/protocol/encryption/encryption_multi_device_test.go index 81c191707..4d23ad37e 100644 --- a/protocol/encryption/encryption_multi_device_test.go +++ b/protocol/encryption/encryption_multi_device_test.go @@ -10,10 +10,11 @@ import ( "github.com/status-im/status-go/protocol/sqlite" - "github.com/status-im/status-go/eth-node/crypto" "github.com/stretchr/testify/suite" "go.uber.org/zap" + "github.com/status-im/status-go/eth-node/crypto" + "github.com/status-im/status-go/protocol/encryption/multidevice" "github.com/status-im/status-go/protocol/encryption/sharedsecret" ) diff --git a/protocol/encryption/encryption_test.go b/protocol/encryption/encryption_test.go index ef91c3b2f..c60d76a98 100644 --- a/protocol/encryption/encryption_test.go +++ b/protocol/encryption/encryption_test.go @@ -14,10 +14,11 @@ import ( "github.com/status-im/status-go/protocol/sqlite" - "github.com/status-im/status-go/eth-node/crypto" "github.com/stretchr/testify/suite" "go.uber.org/zap" + "github.com/status-im/status-go/eth-node/crypto" + "github.com/status-im/status-go/protocol/encryption/multidevice" "github.com/status-im/status-go/protocol/encryption/sharedsecret" ) diff --git a/protocol/encryption/encryptor.go b/protocol/encryption/encryptor.go index baa0326eb..bbaa788b0 100644 --- a/protocol/encryption/encryptor.go +++ b/protocol/encryption/encryptor.go @@ -9,9 +9,10 @@ import ( "time" dr "github.com/status-im/doubleratchet" + "go.uber.org/zap" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/crypto/ecies" - "go.uber.org/zap" "github.com/status-im/status-go/protocol/encryption/multidevice" ) diff --git a/protocol/encryption/multidevice/persistence_test.go b/protocol/encryption/multidevice/persistence_test.go index 85fb19d0b..fd1ad0a93 100644 --- a/protocol/encryption/multidevice/persistence_test.go +++ b/protocol/encryption/multidevice/persistence_test.go @@ -5,8 +5,9 @@ import ( "os" "testing" - "github.com/status-im/status-go/protocol/sqlite" "github.com/stretchr/testify/suite" + + "github.com/status-im/status-go/protocol/sqlite" ) const ( diff --git a/protocol/encryption/persistence.go b/protocol/encryption/persistence.go index b2c78e8ae..1cfbd6dc4 100644 --- a/protocol/encryption/persistence.go +++ b/protocol/encryption/persistence.go @@ -6,6 +6,7 @@ import ( "strings" dr "github.com/status-im/doubleratchet" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/protocol/encryption/multidevice" diff --git a/protocol/encryption/persistence_test.go b/protocol/encryption/persistence_test.go index 8b24c12b5..1f806b1ba 100644 --- a/protocol/encryption/persistence_test.go +++ b/protocol/encryption/persistence_test.go @@ -6,9 +6,10 @@ import ( "path/filepath" "testing" - "github.com/status-im/status-go/eth-node/crypto" "github.com/stretchr/testify/suite" + "github.com/status-im/status-go/eth-node/crypto" + "github.com/status-im/status-go/protocol/encryption/multidevice" "github.com/status-im/status-go/protocol/sqlite" ) diff --git a/protocol/encryption/protocol_message.pb.go b/protocol/encryption/protocol_message.pb.go index a682bdb61..81ce4a314 100644 --- a/protocol/encryption/protocol_message.pb.go +++ b/protocol/encryption/protocol_message.pb.go @@ -5,8 +5,9 @@ package encryption import ( fmt "fmt" - proto "github.com/golang/protobuf/proto" math "math" + + proto "github.com/golang/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/protocol/encryption/protocol_test.go b/protocol/encryption/protocol_test.go index 78b302812..7fba7301e 100644 --- a/protocol/encryption/protocol_test.go +++ b/protocol/encryption/protocol_test.go @@ -9,10 +9,11 @@ import ( "github.com/status-im/status-go/protocol/sqlite" - "github.com/status-im/status-go/eth-node/crypto" "github.com/stretchr/testify/suite" "go.uber.org/zap" + "github.com/status-im/status-go/eth-node/crypto" + "github.com/status-im/status-go/protocol/encryption/multidevice" "github.com/status-im/status-go/protocol/encryption/sharedsecret" ) diff --git a/protocol/encryption/publisher/publisher.go b/protocol/encryption/publisher/publisher.go index 75a5923ae..af42e38c6 100644 --- a/protocol/encryption/publisher/publisher.go +++ b/protocol/encryption/publisher/publisher.go @@ -5,8 +5,9 @@ import ( "errors" "time" - "github.com/status-im/status-go/eth-node/crypto" "go.uber.org/zap" + + "github.com/status-im/status-go/eth-node/crypto" ) const ( diff --git a/protocol/encryption/sharedsecret/service_test.go b/protocol/encryption/sharedsecret/service_test.go index 646f47afb..a23e9a61a 100644 --- a/protocol/encryption/sharedsecret/service_test.go +++ b/protocol/encryption/sharedsecret/service_test.go @@ -7,10 +7,11 @@ import ( "github.com/status-im/status-go/protocol/tt" - "github.com/status-im/status-go/eth-node/crypto" - "github.com/status-im/status-go/protocol/sqlite" "github.com/stretchr/testify/suite" "go.uber.org/zap" + + "github.com/status-im/status-go/eth-node/crypto" + "github.com/status-im/status-go/protocol/sqlite" ) func TestServiceTestSuite(t *testing.T) { diff --git a/protocol/encryption/sharedsecret/sharedsecret.go b/protocol/encryption/sharedsecret/sharedsecret.go index f472a5646..d170f5b65 100644 --- a/protocol/encryption/sharedsecret/sharedsecret.go +++ b/protocol/encryption/sharedsecret/sharedsecret.go @@ -6,9 +6,10 @@ import ( "database/sql" "errors" + "go.uber.org/zap" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/crypto/ecies" - "go.uber.org/zap" ) const sskLen = 16 diff --git a/protocol/encryption/x3dh_test.go b/protocol/encryption/x3dh_test.go index a54064e19..39480db4d 100644 --- a/protocol/encryption/x3dh_test.go +++ b/protocol/encryption/x3dh_test.go @@ -4,9 +4,10 @@ import ( "fmt" "testing" + "github.com/stretchr/testify/require" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/crypto/ecies" - "github.com/stretchr/testify/require" ) const ( diff --git a/protocol/identity/alias/generate_test.go b/protocol/identity/alias/generate_test.go index 64a4eb545..77638934d 100644 --- a/protocol/identity/alias/generate_test.go +++ b/protocol/identity/alias/generate_test.go @@ -1,8 +1,9 @@ package alias import ( - "github.com/stretchr/testify/require" "testing" + + "github.com/stretchr/testify/require" ) func TestGenerate(t *testing.T) { diff --git a/protocol/identity/identicon/identicon.go b/protocol/identity/identicon/identicon.go index ec3f86d31..80d8b0462 100644 --- a/protocol/identity/identicon/identicon.go +++ b/protocol/identity/identicon/identicon.go @@ -2,8 +2,9 @@ package identicon import ( "crypto/md5" - colorful "github.com/lucasb-eyer/go-colorful" "image/color" + + colorful "github.com/lucasb-eyer/go-colorful" ) const ( diff --git a/protocol/message.go b/protocol/message.go index c67837b13..5b805982d 100644 --- a/protocol/message.go +++ b/protocol/message.go @@ -8,6 +8,7 @@ import ( "unicode/utf8" "github.com/gomarkdown/markdown" + "github.com/status-im/status-go/protocol/protobuf" ) diff --git a/protocol/message_handler_test.go b/protocol/message_handler_test.go index cdb86bb76..10ec3d7a1 100644 --- a/protocol/message_handler_test.go +++ b/protocol/message_handler_test.go @@ -1,9 +1,11 @@ package protocol import ( - v1protocol "github.com/status-im/status-go/protocol/v1" - "github.com/stretchr/testify/suite" "testing" + + "github.com/stretchr/testify/suite" + + v1protocol "github.com/status-im/status-go/protocol/v1" ) func TestEventToSystemMessageSuite(t *testing.T) { diff --git a/protocol/message_processor.go b/protocol/message_processor.go index 3fc7e8a6c..16011cf62 100644 --- a/protocol/message_processor.go +++ b/protocol/message_processor.go @@ -8,6 +8,10 @@ import ( "github.com/golang/protobuf/proto" "github.com/pkg/errors" + datasyncnode "github.com/vacp2p/mvds/node" + datasyncproto "github.com/vacp2p/mvds/protobuf" + "go.uber.org/zap" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/protocol/datasync" @@ -17,9 +21,6 @@ import ( "github.com/status-im/status-go/protocol/protobuf" transport "github.com/status-im/status-go/protocol/transport/whisper" v1protocol "github.com/status-im/status-go/protocol/v1" - datasyncnode "github.com/vacp2p/mvds/node" - datasyncproto "github.com/vacp2p/mvds/protobuf" - "go.uber.org/zap" ) // Whisper message properties. diff --git a/protocol/message_processor_test.go b/protocol/message_processor_test.go index d0a258edd..efb19e23b 100644 --- a/protocol/message_processor_test.go +++ b/protocol/message_processor_test.go @@ -11,6 +11,8 @@ import ( "github.com/stretchr/testify/suite" "go.uber.org/zap" + datasyncproto "github.com/vacp2p/mvds/protobuf" + gethbridge "github.com/status-im/status-go/eth-node/bridge/geth" "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" @@ -22,7 +24,6 @@ import ( transport "github.com/status-im/status-go/protocol/transport/whisper" v1protocol "github.com/status-im/status-go/protocol/v1" "github.com/status-im/status-go/whisper/v6" - datasyncproto "github.com/vacp2p/mvds/protobuf" ) func TestMessageProcessorSuite(t *testing.T) { diff --git a/protocol/message_validator.go b/protocol/message_validator.go index 845ef0810..43e512919 100644 --- a/protocol/message_validator.go +++ b/protocol/message_validator.go @@ -2,8 +2,9 @@ package protocol import ( "errors" - "github.com/status-im/status-go/protocol/protobuf" "strings" + + "github.com/status-im/status-go/protocol/protobuf" ) func ValidateReceivedChatMessage(message *protobuf.ChatMessage) error { diff --git a/protocol/message_validator_test.go b/protocol/message_validator_test.go index d91c7b4b5..a9292a43f 100644 --- a/protocol/message_validator_test.go +++ b/protocol/message_validator_test.go @@ -3,8 +3,9 @@ package protocol import ( "testing" - "github.com/status-im/status-go/protocol/protobuf" "github.com/stretchr/testify/suite" + + "github.com/status-im/status-go/protocol/protobuf" ) type MessageValidatorSuite struct { diff --git a/protocol/messenger.go b/protocol/messenger.go index 420144468..6de0caa22 100644 --- a/protocol/messenger.go +++ b/protocol/messenger.go @@ -14,6 +14,7 @@ import ( "go.uber.org/zap" "github.com/golang/protobuf/proto" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" enstypes "github.com/status-im/status-go/eth-node/types/ens" diff --git a/protocol/messenger_test.go b/protocol/messenger_test.go index d657a8cdd..4bba5c8af 100644 --- a/protocol/messenger_test.go +++ b/protocol/messenger_test.go @@ -14,6 +14,9 @@ import ( "github.com/google/uuid" _ "github.com/mutecomm/go-sqlcipher" // require go-sqlcipher that overrides default implementation + "github.com/stretchr/testify/suite" + "go.uber.org/zap" + gethbridge "github.com/status-im/status-go/eth-node/bridge/geth" "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" @@ -23,8 +26,6 @@ import ( "github.com/status-im/status-go/protocol/tt" v1protocol "github.com/status-im/status-go/protocol/v1" "github.com/status-im/status-go/whisper/v6" - "github.com/stretchr/testify/suite" - "go.uber.org/zap" ) func TestMessengerSuite(t *testing.T) { diff --git a/protocol/persistence_legacy.go b/protocol/persistence_legacy.go index de530c95c..55975a6ce 100644 --- a/protocol/persistence_legacy.go +++ b/protocol/persistence_legacy.go @@ -5,9 +5,10 @@ import ( "database/sql" "encoding/json" "fmt" - "github.com/status-im/status-go/protocol/protobuf" "strings" + "github.com/status-im/status-go/protocol/protobuf" + "github.com/pkg/errors" ) diff --git a/protocol/persistence_legacy_test.go b/protocol/persistence_legacy_test.go index 30cdff1a2..ac9cdf619 100644 --- a/protocol/persistence_legacy_test.go +++ b/protocol/persistence_legacy_test.go @@ -9,9 +9,10 @@ import ( "strings" "testing" + "github.com/stretchr/testify/require" + "github.com/status-im/status-go/protocol/protobuf" "github.com/status-im/status-go/protocol/sqlite" - "github.com/stretchr/testify/require" ) func TestTableUserMessagesAllFieldsCount(t *testing.T) { diff --git a/protocol/protobuf/application_metadata_message.pb.go b/protocol/protobuf/application_metadata_message.pb.go index ac37121f0..7b439229f 100644 --- a/protocol/protobuf/application_metadata_message.pb.go +++ b/protocol/protobuf/application_metadata_message.pb.go @@ -5,8 +5,9 @@ package protobuf import ( fmt "fmt" - proto "github.com/golang/protobuf/proto" math "math" + + proto "github.com/golang/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/protocol/protobuf/chat_message.pb.go b/protocol/protobuf/chat_message.pb.go index 25250309a..9963ed524 100644 --- a/protocol/protobuf/chat_message.pb.go +++ b/protocol/protobuf/chat_message.pb.go @@ -5,8 +5,9 @@ package protobuf import ( fmt "fmt" - proto "github.com/golang/protobuf/proto" math "math" + + proto "github.com/golang/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/protocol/protobuf/membership_update_message.pb.go b/protocol/protobuf/membership_update_message.pb.go index 30dd3d1f2..1e923090d 100644 --- a/protocol/protobuf/membership_update_message.pb.go +++ b/protocol/protobuf/membership_update_message.pb.go @@ -5,8 +5,9 @@ package protobuf import ( fmt "fmt" - proto "github.com/golang/protobuf/proto" math "math" + + proto "github.com/golang/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/protocol/protobuf/pubkey.go b/protocol/protobuf/pubkey.go index 72212903b..77f01624a 100644 --- a/protocol/protobuf/pubkey.go +++ b/protocol/protobuf/pubkey.go @@ -2,6 +2,7 @@ package protobuf import ( "crypto/ecdsa" + "github.com/status-im/status-go/eth-node/crypto" ) diff --git a/protocol/transport/whisper/envelopes.go b/protocol/transport/whisper/envelopes.go index 255406410..21da4df38 100644 --- a/protocol/transport/whisper/envelopes.go +++ b/protocol/transport/whisper/envelopes.go @@ -5,8 +5,9 @@ import ( "errors" "sync" - "github.com/status-im/status-go/eth-node/types" "go.uber.org/zap" + + "github.com/status-im/status-go/eth-node/types" ) // EnvelopeState in local tracker diff --git a/protocol/transport/whisper/envelopes_test.go b/protocol/transport/whisper/envelopes_test.go index badb902ce..4445f6464 100644 --- a/protocol/transport/whisper/envelopes_test.go +++ b/protocol/transport/whisper/envelopes_test.go @@ -5,10 +5,12 @@ import ( "go.uber.org/zap" + "github.com/stretchr/testify/suite" + "github.com/ethereum/go-ethereum/p2p/enode" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" - "github.com/stretchr/testify/suite" ) var ( diff --git a/protocol/transport/whisper/filter.go b/protocol/transport/whisper/filter.go index 0074015ee..e237d78f2 100644 --- a/protocol/transport/whisper/filter.go +++ b/protocol/transport/whisper/filter.go @@ -9,9 +9,10 @@ import ( "sync" "github.com/pkg/errors" + "go.uber.org/zap" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" - "go.uber.org/zap" ) const ( diff --git a/protocol/transport/whisper/filter_test.go b/protocol/transport/whisper/filter_test.go index 177b114a8..20fab84d4 100644 --- a/protocol/transport/whisper/filter_test.go +++ b/protocol/transport/whisper/filter_test.go @@ -13,10 +13,11 @@ import ( "github.com/status-im/status-go/protocol/tt" _ "github.com/mutecomm/go-sqlcipher" - "github.com/status-im/status-go/eth-node/crypto" - "github.com/status-im/status-go/whisper/v6" "github.com/stretchr/testify/suite" "go.uber.org/zap" + + "github.com/status-im/status-go/eth-node/crypto" + "github.com/status-im/status-go/whisper/v6" ) func TestFiltersManagerSuite(t *testing.T) { diff --git a/protocol/v1/membership_update_message.go b/protocol/v1/membership_update_message.go index 1a04065e8..2e1bed012 100644 --- a/protocol/v1/membership_update_message.go +++ b/protocol/v1/membership_update_message.go @@ -11,6 +11,7 @@ import ( "github.com/golang/protobuf/proto" "github.com/google/uuid" "github.com/pkg/errors" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/protocol/protobuf" diff --git a/protocol/v1/membership_update_message_test.go b/protocol/v1/membership_update_message_test.go index 8508e2f78..9a4f23397 100644 --- a/protocol/v1/membership_update_message_test.go +++ b/protocol/v1/membership_update_message_test.go @@ -4,10 +4,11 @@ import ( "testing" "github.com/golang/protobuf/proto" - "github.com/status-im/status-go/eth-node/crypto" - "github.com/status-im/status-go/protocol/protobuf" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/status-im/status-go/eth-node/crypto" + "github.com/status-im/status-go/protocol/protobuf" ) var ( diff --git a/protocol/v1/message.go b/protocol/v1/message.go index df7b7c37e..d3607fe5e 100644 --- a/protocol/v1/message.go +++ b/protocol/v1/message.go @@ -6,6 +6,7 @@ import ( "github.com/golang/protobuf/proto" "github.com/pkg/errors" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/protocol/protobuf" diff --git a/protocol/v1/message_test.go b/protocol/v1/message_test.go index 7b6b555c2..e1bef3e45 100644 --- a/protocol/v1/message_test.go +++ b/protocol/v1/message_test.go @@ -3,9 +3,10 @@ package protocol import ( "testing" + "github.com/stretchr/testify/require" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" - "github.com/stretchr/testify/require" ) func TestMessageID(t *testing.T) { diff --git a/protocol/v1/status_message.go b/protocol/v1/status_message.go index 656509c1b..aa9a9cc77 100644 --- a/protocol/v1/status_message.go +++ b/protocol/v1/status_message.go @@ -8,6 +8,7 @@ import ( "github.com/golang/protobuf/proto" "github.com/jinzhu/copier" "github.com/pkg/errors" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/protocol/datasync" diff --git a/rpc/client.go b/rpc/client.go index 9e53786d4..a53fa26e7 100644 --- a/rpc/client.go +++ b/rpc/client.go @@ -12,6 +12,7 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/log" gethrpc "github.com/ethereum/go-ethereum/rpc" + "github.com/status-im/status-go/params" ) diff --git a/services/accounts/accounts.go b/services/accounts/accounts.go index b0c8db100..2cc7739fc 100644 --- a/services/accounts/accounts.go +++ b/services/accounts/accounts.go @@ -4,6 +4,7 @@ import ( "context" "github.com/ethereum/go-ethereum/event" + "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/multiaccounts/accounts" ) diff --git a/services/accounts/service.go b/services/accounts/service.go index a4afb1df5..4e272732b 100644 --- a/services/accounts/service.go +++ b/services/accounts/service.go @@ -4,6 +4,7 @@ import ( "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/rpc" + "github.com/status-im/status-go/account" "github.com/status-im/status-go/multiaccounts" "github.com/status-im/status-go/multiaccounts/accounts" diff --git a/services/browsers/api_test.go b/services/browsers/api_test.go index ac1940ec6..3de11af8b 100644 --- a/services/browsers/api_test.go +++ b/services/browsers/api_test.go @@ -7,8 +7,9 @@ import ( "sort" "testing" - "github.com/status-im/status-go/appdatabase" "github.com/stretchr/testify/require" + + "github.com/status-im/status-go/appdatabase" ) func setupTestDB(t *testing.T) (*Database, func()) { diff --git a/services/incentivisation/contract.go b/services/incentivisation/contract.go index 34879965c..8fda2ce7e 100644 --- a/services/incentivisation/contract.go +++ b/services/incentivisation/contract.go @@ -3,13 +3,15 @@ package incentivisation import ( "context" "errors" + "math/big" + "time" + "github.com/ethereum/go-ethereum/accounts/abi/bind" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" + "github.com/status-im/status-go/mailserver/registry" - "math/big" - "time" ) type Contract interface { diff --git a/services/incentivisation/service_test.go b/services/incentivisation/service_test.go index 7238c48fb..37cfd90d3 100644 --- a/services/incentivisation/service_test.go +++ b/services/incentivisation/service_test.go @@ -7,12 +7,14 @@ import ( "testing" "time" + "github.com/stretchr/testify/suite" + "github.com/ethereum/go-ethereum/accounts/abi/bind" gethcommon "github.com/ethereum/go-ethereum/common" gethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" - "github.com/stretchr/testify/suite" ) var ( diff --git a/services/mailservers/api_test.go b/services/mailservers/api_test.go index 7cf37c5a9..822afddf6 100644 --- a/services/mailservers/api_test.go +++ b/services/mailservers/api_test.go @@ -6,8 +6,9 @@ import ( "os" "testing" - "github.com/status-im/status-go/appdatabase" "github.com/stretchr/testify/require" + + "github.com/status-im/status-go/appdatabase" ) func setupTestDB(t *testing.T) (*Database, func()) { diff --git a/services/peer/discoverer_mock.go b/services/peer/discoverer_mock.go index 185a6a76f..f54e3b102 100644 --- a/services/peer/discoverer_mock.go +++ b/services/peer/discoverer_mock.go @@ -5,8 +5,9 @@ package peer import ( - gomock "github.com/golang/mock/gomock" reflect "reflect" + + gomock "github.com/golang/mock/gomock" ) // MockDiscoverer is a mock of Discoverer interface diff --git a/services/permissions/api_test.go b/services/permissions/api_test.go index bea5e51f4..f7441d6ed 100644 --- a/services/permissions/api_test.go +++ b/services/permissions/api_test.go @@ -9,8 +9,9 @@ import ( "sort" "testing" - "github.com/status-im/status-go/appdatabase" "github.com/stretchr/testify/require" + + "github.com/status-im/status-go/appdatabase" ) func setupTestDB(t *testing.T) (*Database, func()) { diff --git a/services/personal/api.go b/services/personal/api.go index 22f1f8e60..adff39683 100644 --- a/services/personal/api.go +++ b/services/personal/api.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/status-im/status-go/account" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/params" diff --git a/services/rpcfilters/api.go b/services/rpcfilters/api.go index 0996c8d8d..744265461 100644 --- a/services/rpcfilters/api.go +++ b/services/rpcfilters/api.go @@ -7,12 +7,13 @@ import ( "sync" "time" + "github.com/pborman/uuid" + ethereum "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/eth/filters" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rpc" - "github.com/pborman/uuid" ) const ( diff --git a/services/rpcfilters/api_test.go b/services/rpcfilters/api_test.go index 9ddb63a07..537b90d9b 100644 --- a/services/rpcfilters/api_test.go +++ b/services/rpcfilters/api_test.go @@ -7,11 +7,12 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/eth/filters" "github.com/ethereum/go-ethereum/rpc" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) func TestFilterLiveness(t *testing.T) { diff --git a/services/rpcfilters/latest_block_changed_event_test.go b/services/rpcfilters/latest_block_changed_event_test.go index 466483585..776bd26ef 100644 --- a/services/rpcfilters/latest_block_changed_event_test.go +++ b/services/rpcfilters/latest_block_changed_event_test.go @@ -7,9 +7,10 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/stretchr/testify/assert" ) type latestBlockProviderTest struct { diff --git a/services/rpcfilters/latest_block_provider.go b/services/rpcfilters/latest_block_provider.go index c2e9a1722..d0de571ca 100644 --- a/services/rpcfilters/latest_block_provider.go +++ b/services/rpcfilters/latest_block_provider.go @@ -6,6 +6,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/status-im/status-go/rpc" ) diff --git a/services/rpcfilters/latest_logs_test.go b/services/rpcfilters/latest_logs_test.go index 8abcbd2be..f9453dcb1 100644 --- a/services/rpcfilters/latest_logs_test.go +++ b/services/rpcfilters/latest_logs_test.go @@ -8,12 +8,13 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + ethereum "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) type callTracker struct { diff --git a/services/rpcfilters/logs_cache_test.go b/services/rpcfilters/logs_cache_test.go index 86045dccb..9111a44de 100644 --- a/services/rpcfilters/logs_cache_test.go +++ b/services/rpcfilters/logs_cache_test.go @@ -3,10 +3,11 @@ package rpcfilters import ( "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" ) func TestAggregateLogs(t *testing.T) { diff --git a/services/rpcfilters/logs_filter_test.go b/services/rpcfilters/logs_filter_test.go index 9f784a7c4..973d7edf2 100644 --- a/services/rpcfilters/logs_filter_test.go +++ b/services/rpcfilters/logs_filter_test.go @@ -4,10 +4,11 @@ import ( "math/big" "testing" + "github.com/stretchr/testify/require" + ethereum "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/stretchr/testify/require" ) func TestFilterLogs(t *testing.T) { diff --git a/services/rpcfilters/service.go b/services/rpcfilters/service.go index d3e91fd75..cd599ec83 100644 --- a/services/rpcfilters/service.go +++ b/services/rpcfilters/service.go @@ -4,6 +4,7 @@ import ( "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/rpc" + "github.com/status-im/status-go/eth-node/types" ) diff --git a/services/rpcfilters/transaction_sent_to_upstream_event.go b/services/rpcfilters/transaction_sent_to_upstream_event.go index 4cadb841b..9296f7047 100644 --- a/services/rpcfilters/transaction_sent_to_upstream_event.go +++ b/services/rpcfilters/transaction_sent_to_upstream_event.go @@ -5,6 +5,7 @@ import ( "sync" "github.com/ethereum/go-ethereum/log" + "github.com/status-im/status-go/eth-node/types" ) diff --git a/services/rpcfilters/transaction_sent_to_upstream_event_test.go b/services/rpcfilters/transaction_sent_to_upstream_event_test.go index 9af5c2c4a..4acf6c825 100644 --- a/services/rpcfilters/transaction_sent_to_upstream_event_test.go +++ b/services/rpcfilters/transaction_sent_to_upstream_event_test.go @@ -5,9 +5,10 @@ import ( "testing" "time" - "github.com/status-im/status-go/eth-node/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/status-im/status-go/eth-node/types" ) var transactionHashes = []types.Hash{types.HexToHash("0xAA"), types.HexToHash("0xBB"), types.HexToHash("0xCC")} diff --git a/services/shhext/history.go b/services/shhext/history.go index 858bdad59..62f055261 100644 --- a/services/shhext/history.go +++ b/services/shhext/history.go @@ -8,6 +8,7 @@ import ( "time" "github.com/ethereum/go-ethereum/rlp" + "github.com/status-im/status-go/db" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/mailserver" diff --git a/services/shhext/history_test.go b/services/shhext/history_test.go index f36a1a87c..e7567045d 100644 --- a/services/shhext/history_test.go +++ b/services/shhext/history_test.go @@ -5,12 +5,14 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/ethereum/go-ethereum/rlp" + "github.com/status-im/status-go/db" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/mailserver" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) func newTestContext(t *testing.T) Context { diff --git a/services/shhext/mailrequests.go b/services/shhext/mailrequests.go index f13d9ba26..3c06e243f 100644 --- a/services/shhext/mailrequests.go +++ b/services/shhext/mailrequests.go @@ -4,6 +4,7 @@ import ( "sync" "github.com/ethereum/go-ethereum/log" + "github.com/status-im/status-go/eth-node/types" ) diff --git a/services/shhext/mailrequests_test.go b/services/shhext/mailrequests_test.go index be304493d..f8ac4cf4b 100644 --- a/services/shhext/mailrequests_test.go +++ b/services/shhext/mailrequests_test.go @@ -5,8 +5,9 @@ import ( "testing" "time" - "github.com/status-im/status-go/eth-node/types" "github.com/stretchr/testify/suite" + + "github.com/status-im/status-go/eth-node/types" ) var ( diff --git a/services/shhext/mailservers/cache.go b/services/shhext/mailservers/cache.go index e196f17d8..ae59681d7 100644 --- a/services/shhext/mailservers/cache.go +++ b/services/shhext/mailservers/cache.go @@ -4,12 +4,14 @@ import ( "encoding/json" "time" - "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/status-im/status-go/db" - "github.com/status-im/status-go/eth-node/types" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/iterator" "github.com/syndtr/goleveldb/leveldb/util" + + "github.com/ethereum/go-ethereum/p2p/enode" + + "github.com/status-im/status-go/db" + "github.com/status-im/status-go/eth-node/types" ) // NewPeerRecord returns instance of the peer record. diff --git a/services/shhext/mailservers/cache_test.go b/services/shhext/mailservers/cache_test.go index 36d3470d6..f25cd1cff 100644 --- a/services/shhext/mailservers/cache_test.go +++ b/services/shhext/mailservers/cache_test.go @@ -5,10 +5,11 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/p2p/enode" "github.com/stretchr/testify/require" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/storage" + + "github.com/ethereum/go-ethereum/p2p/enode" ) func newInMemCache(t *testing.T) *Cache { diff --git a/services/shhext/mailservers/connmanager.go b/services/shhext/mailservers/connmanager.go index 44238af56..266fdfcaa 100644 --- a/services/shhext/mailservers/connmanager.go +++ b/services/shhext/mailservers/connmanager.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" + "github.com/status-im/status-go/eth-node/types" ) diff --git a/services/shhext/mailservers/connmanager_test.go b/services/shhext/mailservers/connmanager_test.go index 6c0d7a098..1b93ff1d6 100644 --- a/services/shhext/mailservers/connmanager_test.go +++ b/services/shhext/mailservers/connmanager_test.go @@ -6,13 +6,15 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" + "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) type fakePeerEvents struct { diff --git a/services/shhext/mailservers/connmonitor.go b/services/shhext/mailservers/connmonitor.go index 8b601ff02..d263f22fc 100644 --- a/services/shhext/mailservers/connmonitor.go +++ b/services/shhext/mailservers/connmonitor.go @@ -5,6 +5,7 @@ import ( "time" "github.com/ethereum/go-ethereum/log" + "github.com/status-im/status-go/eth-node/types" ) diff --git a/services/shhext/mailservers/connmonitor_test.go b/services/shhext/mailservers/connmonitor_test.go index f88c6c763..b96256260 100644 --- a/services/shhext/mailservers/connmonitor_test.go +++ b/services/shhext/mailservers/connmonitor_test.go @@ -6,10 +6,12 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/ethereum/go-ethereum/p2p/enode" + "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/require" ) func TestUsedConnectionPersisted(t *testing.T) { diff --git a/services/shhext/mailservers/peerstore.go b/services/shhext/mailservers/peerstore.go index b6e34699f..3f1a01030 100644 --- a/services/shhext/mailservers/peerstore.go +++ b/services/shhext/mailservers/peerstore.go @@ -6,6 +6,7 @@ import ( "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" + "github.com/status-im/status-go/eth-node/types" ) diff --git a/services/shhext/mailservers/peerstore_test.go b/services/shhext/mailservers/peerstore_test.go index 4aa43b0a6..e08b21f50 100644 --- a/services/shhext/mailservers/peerstore_test.go +++ b/services/shhext/mailservers/peerstore_test.go @@ -3,11 +3,13 @@ package mailservers import ( "testing" + "github.com/stretchr/testify/require" + "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" + "github.com/status-im/status-go/eth-node/types" - "github.com/stretchr/testify/require" ) func RandomNode() (*enode.Node, error) { diff --git a/services/shhext/mailservers/utils.go b/services/shhext/mailservers/utils.go index d187d4ad4..dfbcda046 100644 --- a/services/shhext/mailservers/utils.go +++ b/services/shhext/mailservers/utils.go @@ -4,6 +4,7 @@ import ( "sort" "github.com/ethereum/go-ethereum/p2p/enode" + "github.com/status-im/status-go/eth-node/types" ) diff --git a/services/shhext/mailservers/utils_test.go b/services/shhext/mailservers/utils_test.go index d3cc86aa7..7a9109cc2 100644 --- a/services/shhext/mailservers/utils_test.go +++ b/services/shhext/mailservers/utils_test.go @@ -4,10 +4,12 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" + "github.com/status-im/status-go/eth-node/types" - "github.com/stretchr/testify/require" ) func TestGetFirstConnected(t *testing.T) { diff --git a/services/shhext/requests_test.go b/services/shhext/requests_test.go index 45cff470f..e6b876538 100644 --- a/services/shhext/requests_test.go +++ b/services/shhext/requests_test.go @@ -4,8 +4,9 @@ import ( "testing" "time" - "github.com/status-im/status-go/eth-node/types" "github.com/stretchr/testify/require" + + "github.com/status-im/status-go/eth-node/types" ) func TestRegisterSameRequests(t *testing.T) { diff --git a/services/shhext/rpc.go b/services/shhext/rpc.go index 52390b812..951b9f663 100644 --- a/services/shhext/rpc.go +++ b/services/shhext/rpc.go @@ -5,6 +5,7 @@ package shhext import ( "crypto/ecdsa" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" ) diff --git a/services/shhext/service.go b/services/shhext/service.go index 4f171bbca..02edc5195 100644 --- a/services/shhext/service.go +++ b/services/shhext/service.go @@ -22,11 +22,12 @@ import ( "github.com/status-im/status-go/services/shhext/mailservers" "github.com/status-im/status-go/signal" + "github.com/syndtr/goleveldb/leveldb" + "go.uber.org/zap" + "github.com/status-im/status-go/eth-node/types" protocol "github.com/status-im/status-go/protocol" protocolwhisper "github.com/status-im/status-go/protocol/transport/whisper" - "github.com/syndtr/goleveldb/leveldb" - "go.uber.org/zap" ) const ( diff --git a/services/shhext/service_test.go b/services/shhext/service_test.go index 3d627e19f..b996d3329 100644 --- a/services/shhext/service_test.go +++ b/services/shhext/service_test.go @@ -12,12 +12,18 @@ import ( "testing" "time" + "github.com/stretchr/testify/suite" + "github.com/syndtr/goleveldb/leveldb" + "github.com/syndtr/goleveldb/leveldb/storage" + "go.uber.org/zap" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" + gethbridge "github.com/status-im/status-go/eth-node/bridge/geth" "github.com/status-im/status-go/eth-node/types" enstypes "github.com/status-im/status-go/eth-node/types/ens" @@ -27,10 +33,6 @@ import ( "github.com/status-im/status-go/t/helpers" "github.com/status-im/status-go/t/utils" "github.com/status-im/status-go/whisper/v6" - "github.com/stretchr/testify/suite" - "github.com/syndtr/goleveldb/leveldb" - "github.com/syndtr/goleveldb/leveldb/storage" - "go.uber.org/zap" ) const ( diff --git a/services/status/account_mock.go b/services/status/account_mock.go index 483cf7f61..16728cf41 100644 --- a/services/status/account_mock.go +++ b/services/status/account_mock.go @@ -6,10 +6,12 @@ package status import ( ecdsa "crypto/ecdsa" + reflect "reflect" + gomock "github.com/golang/mock/gomock" + account "github.com/status-im/status-go/account" types "github.com/status-im/status-go/eth-node/types" - reflect "reflect" ) // MockWhisperService is a mock of WhisperService interface diff --git a/services/status/api_test.go b/services/status/api_test.go index ea9ea2432..22a26f9e0 100644 --- a/services/status/api_test.go +++ b/services/status/api_test.go @@ -7,9 +7,10 @@ import ( "testing" "github.com/golang/mock/gomock" + "github.com/stretchr/testify/suite" + "github.com/status-im/status-go/account" "github.com/status-im/status-go/eth-node/types" - "github.com/stretchr/testify/suite" ) func TestStatusSuite(t *testing.T) { diff --git a/services/status/service.go b/services/status/service.go index 0284d6375..c8aa85204 100644 --- a/services/status/service.go +++ b/services/status/service.go @@ -6,6 +6,7 @@ import ( "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/rpc" + "github.com/status-im/status-go/account" "github.com/status-im/status-go/eth-node/types" ) diff --git a/services/subscriptions/subscriptions_test.go b/services/subscriptions/subscriptions_test.go index f91d8cb5b..ddd904426 100644 --- a/services/subscriptions/subscriptions_test.go +++ b/services/subscriptions/subscriptions_test.go @@ -8,8 +8,9 @@ import ( "testing" "time" - "github.com/status-im/status-go/signal" "github.com/stretchr/testify/require" + + "github.com/status-im/status-go/signal" ) const ( diff --git a/services/typeddata/hash_test.go b/services/typeddata/hash_test.go index eedfb42a5..f77a3aa42 100644 --- a/services/typeddata/hash_test.go +++ b/services/typeddata/hash_test.go @@ -6,12 +6,13 @@ import ( "math/big" "testing" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) func TestTypeString(t *testing.T) { diff --git a/services/typeddata/sign_test.go b/services/typeddata/sign_test.go index 0ce27bb2b..ae2743e53 100644 --- a/services/typeddata/sign_test.go +++ b/services/typeddata/sign_test.go @@ -7,13 +7,15 @@ import ( "math/big" "testing" + "github.com/stretchr/testify/require" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/status-im/status-go/services/typeddata/eip712example" - "github.com/stretchr/testify/require" ) var ( diff --git a/services/wallet/balance.go b/services/wallet/balance.go index 2e0b59b06..8dfc9d0c1 100644 --- a/services/wallet/balance.go +++ b/services/wallet/balance.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" + "github.com/status-im/status-go/services/wallet/ierc20" ) diff --git a/services/wallet/balance_test.go b/services/wallet/balance_test.go index da5875e56..1bbe0ef25 100644 --- a/services/wallet/balance_test.go +++ b/services/wallet/balance_test.go @@ -6,13 +6,15 @@ import ( "math/big" "testing" + "github.com/stretchr/testify/suite" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethclient" + "github.com/status-im/status-go/services/wallet/erc20" "github.com/status-im/status-go/t/devtests/miner" - "github.com/stretchr/testify/suite" ) func TestBalancesSuite(t *testing.T) { diff --git a/services/wallet/commands_test.go b/services/wallet/commands_test.go index 804546a71..13ba43d68 100644 --- a/services/wallet/commands_test.go +++ b/services/wallet/commands_test.go @@ -6,13 +6,15 @@ import ( "testing" "time" + "github.com/stretchr/testify/suite" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/event" + "github.com/status-im/status-go/t/devtests/testchain" - "github.com/stretchr/testify/suite" ) func TestNewBlocksSuite(t *testing.T) { diff --git a/services/wallet/concurrent_test.go b/services/wallet/concurrent_test.go index d60be339c..c14ab0bb3 100644 --- a/services/wallet/concurrent_test.go +++ b/services/wallet/concurrent_test.go @@ -8,8 +8,9 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" + + "github.com/ethereum/go-ethereum/common" ) func TestConcurrentErrorInterrupts(t *testing.T) { diff --git a/services/wallet/database_test.go b/services/wallet/database_test.go index 13613fcb8..b8b6a44c8 100644 --- a/services/wallet/database_test.go +++ b/services/wallet/database_test.go @@ -6,10 +6,12 @@ import ( "os" "testing" + "github.com/stretchr/testify/require" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/status-im/status-go/appdatabase" - "github.com/stretchr/testify/require" ) func setupTestDB(t *testing.T) (*Database, func()) { diff --git a/services/wallet/downloader_test.go b/services/wallet/downloader_test.go index a9036740c..420477cd7 100644 --- a/services/wallet/downloader_test.go +++ b/services/wallet/downloader_test.go @@ -7,14 +7,16 @@ import ( "testing" "time" + "github.com/stretchr/testify/suite" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethclient" + "github.com/status-im/status-go/services/wallet/erc20" "github.com/status-im/status-go/t/devtests/miner" - "github.com/stretchr/testify/suite" ) func TestETHTransfers(t *testing.T) { diff --git a/services/wallet/iterative_test.go b/services/wallet/iterative_test.go index 3bb66927e..3d90bac03 100644 --- a/services/wallet/iterative_test.go +++ b/services/wallet/iterative_test.go @@ -6,9 +6,10 @@ import ( "math/big" "testing" + "github.com/stretchr/testify/require" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/stretchr/testify/require" ) type transfersFixture []Transfer diff --git a/services/wallet/reactor.go b/services/wallet/reactor.go index a31444942..a8dca62a3 100644 --- a/services/wallet/reactor.go +++ b/services/wallet/reactor.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/event" + "github.com/status-im/status-go/params" ) diff --git a/services/wallet/service.go b/services/wallet/service.go index 8e5c8da87..a0012428f 100644 --- a/services/wallet/service.go +++ b/services/wallet/service.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/rpc" + "github.com/status-im/status-go/multiaccounts/accounts" ) diff --git a/services/wallet/service_test.go b/services/wallet/service_test.go index fb1409caa..cc8e34312 100644 --- a/services/wallet/service_test.go +++ b/services/wallet/service_test.go @@ -7,15 +7,17 @@ import ( "testing" "time" + "github.com/stretchr/testify/suite" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" gethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/event" + "github.com/status-im/status-go/multiaccounts/accounts" "github.com/status-im/status-go/t/devtests/testchain" "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/suite" "github.com/status-im/status-go/eth-node/types" ) diff --git a/services/wallet/transmitter.go b/services/wallet/transmitter.go index e112cc945..8aa89a775 100644 --- a/services/wallet/transmitter.go +++ b/services/wallet/transmitter.go @@ -6,6 +6,7 @@ import ( "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/log" + "github.com/status-im/status-go/signal" ) diff --git a/signal/events_shhext.go b/signal/events_shhext.go index af4fb8f3a..61c611c54 100644 --- a/signal/events_shhext.go +++ b/signal/events_shhext.go @@ -4,6 +4,7 @@ import ( "encoding/hex" "github.com/ethereum/go-ethereum/common/hexutil" + statusproto "github.com/status-im/status-go/protocol" "github.com/status-im/status-go/eth-node/types" diff --git a/t/benchmarks/mailserver_test.go b/t/benchmarks/mailserver_test.go index 8cd324f73..da8fe0040 100644 --- a/t/benchmarks/mailserver_test.go +++ b/t/benchmarks/mailserver_test.go @@ -7,14 +7,16 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/ethereum/go-ethereum/node" + gethbridge "github.com/status-im/status-go/eth-node/bridge/geth" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/params" "github.com/status-im/status-go/services/nodebridge" "github.com/status-im/status-go/services/shhext" "github.com/status-im/status-go/whisper/v6" - "github.com/stretchr/testify/require" ) const ( diff --git a/t/benchmarks/messages_test.go b/t/benchmarks/messages_test.go index 59252d8dd..688117551 100644 --- a/t/benchmarks/messages_test.go +++ b/t/benchmarks/messages_test.go @@ -6,9 +6,11 @@ import ( "fmt" "testing" - "github.com/ethereum/go-ethereum/node" - "github.com/status-im/status-go/whisper/v6" "github.com/stretchr/testify/require" + + "github.com/ethereum/go-ethereum/node" + + "github.com/status-im/status-go/whisper/v6" ) // TestSendMessages sends messages to a peer. diff --git a/t/benchmarks/utils_test.go b/t/benchmarks/utils_test.go index 19e0c8d71..1eaa8788f 100644 --- a/t/benchmarks/utils_test.go +++ b/t/benchmarks/utils_test.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/nat" + "github.com/status-im/status-go/whisper/v6" ) diff --git a/t/devtests/devnode.go b/t/devtests/devnode.go index 3c7bc6d82..0c75340fe 100644 --- a/t/devtests/devnode.go +++ b/t/devtests/devnode.go @@ -7,10 +7,13 @@ import ( "io/ioutil" "os" + "github.com/stretchr/testify/suite" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/rpc" + "github.com/status-im/status-go/api" "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" @@ -19,7 +22,6 @@ import ( "github.com/status-im/status-go/params" statusrpc "github.com/status-im/status-go/rpc" "github.com/status-im/status-go/t/devtests/miner" - "github.com/stretchr/testify/suite" ) // DevNodeSuite provides convenient wrapper for starting node with clique backend for mining. diff --git a/t/devtests/filters_test.go b/t/devtests/filters_test.go index 36cda4c7c..c992e7a5a 100644 --- a/t/devtests/filters_test.go +++ b/t/devtests/filters_test.go @@ -6,12 +6,14 @@ import ( "testing" "time" + "github.com/stretchr/testify/suite" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/status-im/status-go/t/devtests/eventer" "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/suite" ) func TestLogsSuite(t *testing.T) { diff --git a/t/devtests/tranfers_test.go b/t/devtests/tranfers_test.go index f5d59570a..12973e334 100644 --- a/t/devtests/tranfers_test.go +++ b/t/devtests/tranfers_test.go @@ -7,14 +7,16 @@ import ( "testing" "time" + "github.com/stretchr/testify/suite" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" gethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/services/wallet" "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/suite" ) func TestTransfersSuite(t *testing.T) { diff --git a/t/e2e/accounts/accounts_rpc_test.go b/t/e2e/accounts/accounts_rpc_test.go index bbc8260a2..8c054563c 100644 --- a/t/e2e/accounts/accounts_rpc_test.go +++ b/t/e2e/accounts/accounts_rpc_test.go @@ -4,10 +4,11 @@ import ( "strings" "testing" + "github.com/stretchr/testify/suite" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/t/e2e" . "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/suite" ) func TestAccountsRPCTestSuite(t *testing.T) { diff --git a/t/e2e/accounts/accounts_test.go b/t/e2e/accounts/accounts_test.go index 80d5691e8..e3379d405 100644 --- a/t/e2e/accounts/accounts_test.go +++ b/t/e2e/accounts/accounts_test.go @@ -6,13 +6,15 @@ import ( "fmt" "testing" + "github.com/stretchr/testify/suite" + "github.com/ethereum/go-ethereum/crypto" + "github.com/status-im/status-go/account" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/extkeys" "github.com/status-im/status-go/t/e2e" "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/suite" ) func buildLoginParams(mainAccountAddress, chatAddress, password string, watchAddresses []types.Address) account.LoginParams { diff --git a/t/e2e/api/api_test.go b/t/e2e/api/api_test.go index 449f93ab1..760b8f2d1 100644 --- a/t/e2e/api/api_test.go +++ b/t/e2e/api/api_test.go @@ -6,14 +6,15 @@ import ( "testing" "time" + "github.com/stretchr/testify/suite" + "github.com/syndtr/goleveldb/leveldb" + "github.com/syndtr/goleveldb/leveldb/storage" + "github.com/status-im/status-go/api" "github.com/status-im/status-go/node" "github.com/status-im/status-go/params" "github.com/status-im/status-go/signal" "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/suite" - "github.com/syndtr/goleveldb/leveldb" - "github.com/syndtr/goleveldb/leveldb/storage" ) func TestAPI(t *testing.T) { diff --git a/t/e2e/api/backend_test.go b/t/e2e/api/backend_test.go index a01f6c534..dc7f67179 100644 --- a/t/e2e/api/backend_test.go +++ b/t/e2e/api/backend_test.go @@ -5,10 +5,11 @@ import ( "os" "testing" + "github.com/stretchr/testify/suite" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/t/e2e" . "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/suite" ) func TestAPIBackendTestSuite(t *testing.T) { diff --git a/t/e2e/node/manager_test.go b/t/e2e/node/manager_test.go index 62e6a6e9b..7e66af271 100644 --- a/t/e2e/node/manager_test.go +++ b/t/e2e/node/manager_test.go @@ -8,13 +8,15 @@ import ( "github.com/ethereum/go-ethereum/les" gethnode "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/rpc" + "github.com/status-im/status-go/node" "github.com/status-im/status-go/params" "github.com/status-im/status-go/whisper/v6" + "github.com/stretchr/testify/suite" + "github.com/status-im/status-go/t/e2e" . "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/suite" ) func TestManagerTestSuite(t *testing.T) { diff --git a/t/e2e/rpc/client_test.go b/t/e2e/rpc/client_test.go index 96ff11f91..5abea2057 100644 --- a/t/e2e/rpc/client_test.go +++ b/t/e2e/rpc/client_test.go @@ -3,11 +3,12 @@ package rpc import ( "testing" + "github.com/stretchr/testify/suite" + "github.com/status-im/status-go/node" "github.com/status-im/status-go/rpc" "github.com/status-im/status-go/t/e2e" . "github.com/status-im/status-go/t/utils" //nolint: golint - "github.com/stretchr/testify/suite" ) type RPCClientTestSuite struct { diff --git a/t/e2e/rpc/rpc_test.go b/t/e2e/rpc/rpc_test.go index 11f197369..c95fb30bd 100644 --- a/t/e2e/rpc/rpc_test.go +++ b/t/e2e/rpc/rpc_test.go @@ -8,12 +8,14 @@ import ( "testing" "time" + "github.com/stretchr/testify/suite" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/status-im/status-go/node" "github.com/status-im/status-go/params" "github.com/status-im/status-go/t/e2e" . "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/suite" ) func TestRPCTestSuite(t *testing.T) { diff --git a/t/e2e/services/filters_latest_test.go b/t/e2e/services/filters_latest_test.go index 9a071a575..917ee9e49 100644 --- a/t/e2e/services/filters_latest_test.go +++ b/t/e2e/services/filters_latest_test.go @@ -6,9 +6,10 @@ import ( "testing" "time" + "github.com/stretchr/testify/suite" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/suite" ) func TestFiltersAPISuite(t *testing.T) { diff --git a/t/e2e/services/peer_api_test.go b/t/e2e/services/peer_api_test.go index 1eec55c46..cb6e8bc3f 100644 --- a/t/e2e/services/peer_api_test.go +++ b/t/e2e/services/peer_api_test.go @@ -3,9 +3,10 @@ package services import ( "testing" + "github.com/stretchr/testify/suite" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/suite" ) func TestPeerAPISuite(t *testing.T) { diff --git a/t/e2e/services/personal_api_test.go b/t/e2e/services/personal_api_test.go index de835aab1..489dc8ee7 100644 --- a/t/e2e/services/personal_api_test.go +++ b/t/e2e/services/personal_api_test.go @@ -4,9 +4,10 @@ import ( "fmt" "testing" + "github.com/stretchr/testify/suite" + "github.com/status-im/status-go/params" . "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/suite" ) const ( diff --git a/t/e2e/services/status_api_test.go b/t/e2e/services/status_api_test.go index 92bebf194..1c5b8aefe 100644 --- a/t/e2e/services/status_api_test.go +++ b/t/e2e/services/status_api_test.go @@ -6,11 +6,12 @@ import ( "strings" "testing" + "github.com/stretchr/testify/suite" + "github.com/status-im/status-go/account" "github.com/status-im/status-go/params" "github.com/status-im/status-go/services/status" "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/suite" ) type statusTestParams struct { diff --git a/t/e2e/suites.go b/t/e2e/suites.go index 5bcc40c54..63fbd3332 100644 --- a/t/e2e/suites.go +++ b/t/e2e/suites.go @@ -3,9 +3,10 @@ package e2e import ( "encoding/json" - "github.com/ethereum/go-ethereum/log" "github.com/stretchr/testify/suite" + "github.com/ethereum/go-ethereum/log" + "github.com/status-im/status-go/api" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/multiaccounts" diff --git a/t/e2e/testing.go b/t/e2e/testing.go index 5f739633e..63afbeb35 100644 --- a/t/e2e/testing.go +++ b/t/e2e/testing.go @@ -5,6 +5,7 @@ import ( "path" gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/status-im/status-go/node" "github.com/status-im/status-go/params" ) diff --git a/t/e2e/transactions/transactions_test.go b/t/e2e/transactions/transactions_test.go index f467b287b..2a681c810 100644 --- a/t/e2e/transactions/transactions_test.go +++ b/t/e2e/transactions/transactions_test.go @@ -7,7 +7,10 @@ import ( "reflect" "testing" + "github.com/stretchr/testify/suite" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/status-im/status-go/account" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/multiaccounts" @@ -16,7 +19,6 @@ import ( "github.com/status-im/status-go/t/e2e" "github.com/status-im/status-go/t/utils" "github.com/status-im/status-go/transactions" - "github.com/stretchr/testify/suite" ) type initFunc func([]byte, *transactions.SendTxArgs) diff --git a/t/e2e/whisper/mailservice_test.go b/t/e2e/whisper/mailservice_test.go index 93b523257..00687e1bb 100644 --- a/t/e2e/whisper/mailservice_test.go +++ b/t/e2e/whisper/mailservice_test.go @@ -6,11 +6,12 @@ import ( "net/http" "testing" + "github.com/stretchr/testify/suite" + "github.com/status-im/status-go/node" "github.com/status-im/status-go/params" "github.com/status-im/status-go/t/e2e" "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/suite" ) func TestMailServiceSuite(t *testing.T) { diff --git a/t/e2e/whisper/whisper_ext_test.go b/t/e2e/whisper/whisper_ext_test.go index a3a889142..e1bba46a6 100644 --- a/t/e2e/whisper/whisper_ext_test.go +++ b/t/e2e/whisper/whisper_ext_test.go @@ -6,9 +6,10 @@ import ( "os" "testing" + "github.com/stretchr/testify/suite" + "github.com/status-im/status-go/node" "github.com/status-im/status-go/t/utils" - "github.com/stretchr/testify/suite" ) func TestWhisperExtensionSuite(t *testing.T) { diff --git a/t/e2e/whisper/whisper_mailbox_test.go b/t/e2e/whisper/whisper_mailbox_test.go index 51e046d17..af2bcfad0 100644 --- a/t/e2e/whisper/whisper_mailbox_test.go +++ b/t/e2e/whisper/whisper_mailbox_test.go @@ -13,10 +13,14 @@ import ( "testing" "time" + "github.com/stretchr/testify/suite" + "golang.org/x/crypto/sha3" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p" + "github.com/status-im/status-go/api" "github.com/status-im/status-go/mailserver" "github.com/status-im/status-go/params" @@ -25,8 +29,6 @@ import ( "github.com/status-im/status-go/t/helpers" "github.com/status-im/status-go/t/utils" "github.com/status-im/status-go/whisper/v6" - "github.com/stretchr/testify/suite" - "golang.org/x/crypto/sha3" ) const mailboxPassword = "status-offline-inbox" diff --git a/t/e2e/whisper/whisper_test.go b/t/e2e/whisper/whisper_test.go index cbc28035a..2b46126f0 100644 --- a/t/e2e/whisper/whisper_test.go +++ b/t/e2e/whisper/whisper_test.go @@ -5,13 +5,15 @@ import ( "errors" "testing" + "github.com/stretchr/testify/suite" + "github.com/ethereum/go-ethereum/crypto" + "github.com/status-im/status-go/account" "github.com/status-im/status-go/eth-node/types" e2e "github.com/status-im/status-go/t/e2e" . "github.com/status-im/status-go/t/utils" "github.com/status-im/status-go/whisper/v6" - "github.com/stretchr/testify/suite" ) func TestWhisperTestSuite(t *testing.T) { diff --git a/t/utils/utils.go b/t/utils/utils.go index 578927ec9..73defd01d 100644 --- a/t/utils/utils.go +++ b/t/utils/utils.go @@ -18,11 +18,12 @@ import ( "testing" "time" + _ "github.com/stretchr/testify/suite" // required to register testify flags + "github.com/status-im/status-go/logutils" "github.com/status-im/status-go/params" "github.com/status-im/status-go/static" "github.com/status-im/status-go/t" - _ "github.com/stretchr/testify/suite" // required to register testify flags ) var ( diff --git a/timesource/timesource.go b/timesource/timesource.go index 8705818d8..50195db9b 100644 --- a/timesource/timesource.go +++ b/timesource/timesource.go @@ -8,6 +8,7 @@ import ( "time" "github.com/beevik/ntp" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/rpc" diff --git a/transactions/fake/mock.go b/transactions/fake/mock.go index 22a3b5e88..7ccd5d6e1 100644 --- a/transactions/fake/mock.go +++ b/transactions/fake/mock.go @@ -6,11 +6,13 @@ package fake import ( context "context" + reflect "reflect" + + gomock "github.com/golang/mock/gomock" + common "github.com/ethereum/go-ethereum/common" hexutil "github.com/ethereum/go-ethereum/common/hexutil" rpc "github.com/ethereum/go-ethereum/rpc" - gomock "github.com/golang/mock/gomock" - reflect "reflect" ) // MockPublicTransactionPoolAPI is a mock of PublicTransactionPoolAPI interface diff --git a/transactions/fake/txservice.go b/transactions/fake/txservice.go index 9edfeb1eb..12c257b34 100644 --- a/transactions/fake/txservice.go +++ b/transactions/fake/txservice.go @@ -3,10 +3,11 @@ package fake import ( "context" + "github.com/golang/mock/gomock" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/rpc" - "github.com/golang/mock/gomock" ) // NewTestServer returns a mocked test server diff --git a/transactions/rpc_wrapper.go b/transactions/rpc_wrapper.go index fe37a7cd5..ac7247cff 100644 --- a/transactions/rpc_wrapper.go +++ b/transactions/rpc_wrapper.go @@ -9,6 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" gethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" + "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/rpc" diff --git a/transactions/transactor_test.go b/transactions/transactor_test.go index e404250dd..2218cff5c 100644 --- a/transactions/transactor_test.go +++ b/transactions/transactor_test.go @@ -10,6 +10,9 @@ import ( "testing" "time" + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/suite" + "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" @@ -19,7 +22,7 @@ import ( gethparams "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" gethrpc "github.com/ethereum/go-ethereum/rpc" - "github.com/golang/mock/gomock" + "github.com/status-im/status-go/account" "github.com/status-im/status-go/contracts/ens/contract" "github.com/status-im/status-go/eth-node/crypto" @@ -28,7 +31,6 @@ import ( "github.com/status-im/status-go/rpc" "github.com/status-im/status-go/t/utils" "github.com/status-im/status-go/transactions/fake" - "github.com/stretchr/testify/suite" ) func TestTransactorSuite(t *testing.T) { diff --git a/transactions/types.go b/transactions/types.go index 4d4ccd557..90b0ba3f0 100644 --- a/transactions/types.go +++ b/transactions/types.go @@ -8,6 +8,7 @@ import ( ethereum "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/status-im/status-go/eth-node/types" ) diff --git a/transactions/types_test.go b/transactions/types_test.go index a63889442..6114cdc16 100644 --- a/transactions/types_test.go +++ b/transactions/types_test.go @@ -3,8 +3,9 @@ package transactions import ( "testing" - "github.com/status-im/status-go/eth-node/types" "github.com/stretchr/testify/assert" + + "github.com/status-im/status-go/eth-node/types" ) func TestSendTxArgsValidity(t *testing.T) { diff --git a/vendor/github.com/status-im/status-go/eth-node/bridge/geth/ens/ens.go b/vendor/github.com/status-im/status-go/eth-node/bridge/geth/ens/ens.go index 18f6e0e92..ef6196c48 100644 --- a/vendor/github.com/status-im/status-go/eth-node/bridge/geth/ens/ens.go +++ b/vendor/github.com/status-im/status-go/eth-node/bridge/geth/ens/ens.go @@ -8,11 +8,13 @@ import ( "math/big" "time" - "github.com/ethereum/go-ethereum/ethclient" - "github.com/status-im/status-go/eth-node/crypto" - enstypes "github.com/status-im/status-go/eth-node/types/ens" ens "github.com/wealdtech/go-ens/v3" "go.uber.org/zap" + + "github.com/ethereum/go-ethereum/ethclient" + + "github.com/status-im/status-go/eth-node/crypto" + enstypes "github.com/status-im/status-go/eth-node/types/ens" ) const ( diff --git a/vendor/github.com/status-im/status-go/eth-node/bridge/geth/keystore.go b/vendor/github.com/status-im/status-go/eth-node/bridge/geth/keystore.go index af12dc068..85cd4e92f 100644 --- a/vendor/github.com/status-im/status-go/eth-node/bridge/geth/keystore.go +++ b/vendor/github.com/status-im/status-go/eth-node/bridge/geth/keystore.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/common" + "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/extkeys" ) diff --git a/vendor/github.com/status-im/status-go/eth-node/bridge/geth/node.go b/vendor/github.com/status-im/status-go/eth-node/bridge/geth/node.go index c07043b39..7cfa42b71 100644 --- a/vendor/github.com/status-im/status-go/eth-node/bridge/geth/node.go +++ b/vendor/github.com/status-im/status-go/eth-node/bridge/geth/node.go @@ -1,13 +1,15 @@ package gethbridge import ( + "go.uber.org/zap" + "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/p2p/enode" + gethens "github.com/status-im/status-go/eth-node/bridge/geth/ens" "github.com/status-im/status-go/eth-node/types" enstypes "github.com/status-im/status-go/eth-node/types/ens" "github.com/status-im/status-go/whisper/v6" - "go.uber.org/zap" ) type gethNodeWrapper struct { diff --git a/vendor/github.com/status-im/status-go/eth-node/bridge/geth/public_whisper_api.go b/vendor/github.com/status-im/status-go/eth-node/bridge/geth/public_whisper_api.go index d26ba6dc4..c99c8445d 100644 --- a/vendor/github.com/status-im/status-go/eth-node/bridge/geth/public_whisper_api.go +++ b/vendor/github.com/status-im/status-go/eth-node/bridge/geth/public_whisper_api.go @@ -4,6 +4,7 @@ import ( "context" "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/whisper/v6" ) diff --git a/vendor/github.com/status-im/status-go/eth-node/bridge/geth/subscription.go b/vendor/github.com/status-im/status-go/eth-node/bridge/geth/subscription.go index 7e707f0a3..f6cfb852e 100644 --- a/vendor/github.com/status-im/status-go/eth-node/bridge/geth/subscription.go +++ b/vendor/github.com/status-im/status-go/eth-node/bridge/geth/subscription.go @@ -2,6 +2,7 @@ package gethbridge import ( "github.com/ethereum/go-ethereum/event" + "github.com/status-im/status-go/eth-node/types" ) diff --git a/vendor/github.com/status-im/status-go/eth-node/crypto/ethereum_crypto.go b/vendor/github.com/status-im/status-go/eth-node/crypto/ethereum_crypto.go index 69a282cba..f4007a4e4 100644 --- a/vendor/github.com/status-im/status-go/eth-node/crypto/ethereum_crypto.go +++ b/vendor/github.com/status-im/status-go/eth-node/crypto/ethereum_crypto.go @@ -10,8 +10,9 @@ import ( "io" dr "github.com/status-im/doubleratchet" - "github.com/status-im/status-go/eth-node/crypto/ecies" "golang.org/x/crypto/hkdf" + + "github.com/status-im/status-go/eth-node/crypto/ecies" ) // EthereumCrypto is an implementation of Crypto with cryptographic primitives recommended diff --git a/vendor/github.com/status-im/status-go/eth-node/crypto/gethcrypto.go b/vendor/github.com/status-im/status-go/eth-node/crypto/gethcrypto.go index 634484fce..f87982965 100644 --- a/vendor/github.com/status-im/status-go/eth-node/crypto/gethcrypto.go +++ b/vendor/github.com/status-im/status-go/eth-node/crypto/gethcrypto.go @@ -28,11 +28,13 @@ import ( "math/big" "os" + "golang.org/x/crypto/sha3" + "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/crypto/secp256k1" "github.com/ethereum/go-ethereum/rlp" + "github.com/status-im/status-go/eth-node/types" - "golang.org/x/crypto/sha3" ) //SignatureLength indicates the byte length required to carry a signature with recovery id. diff --git a/vendor/github.com/status-im/status-go/eth-node/keystore/passphrase.go b/vendor/github.com/status-im/status-go/eth-node/keystore/passphrase.go index 36d8a5755..b13f546aa 100644 --- a/vendor/github.com/status-im/status-go/eth-node/keystore/passphrase.go +++ b/vendor/github.com/status-im/status-go/eth-node/keystore/passphrase.go @@ -13,11 +13,12 @@ import ( "fmt" "github.com/pborman/uuid" + "golang.org/x/crypto/pbkdf2" + "golang.org/x/crypto/scrypt" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/extkeys" - "golang.org/x/crypto/pbkdf2" - "golang.org/x/crypto/scrypt" ) const ( diff --git a/vendor/github.com/status-im/status-go/eth-node/types/key.go b/vendor/github.com/status-im/status-go/eth-node/types/key.go index be2e83c0d..c0fded848 100644 --- a/vendor/github.com/status-im/status-go/eth-node/types/key.go +++ b/vendor/github.com/status-im/status-go/eth-node/types/key.go @@ -4,6 +4,7 @@ import ( "crypto/ecdsa" "github.com/pborman/uuid" + "github.com/status-im/status-go/extkeys" ) diff --git a/vendor/github.com/status-im/status-go/eth-node/types/node.go b/vendor/github.com/status-im/status-go/eth-node/types/node.go index 4568258fb..20f3aead6 100644 --- a/vendor/github.com/status-im/status-go/eth-node/types/node.go +++ b/vendor/github.com/status-im/status-go/eth-node/types/node.go @@ -3,8 +3,9 @@ package types import ( "fmt" - enstypes "github.com/status-im/status-go/eth-node/types/ens" "go.uber.org/zap" + + enstypes "github.com/status-im/status-go/eth-node/types/ens" ) // EnodeID is a unique identifier for each node. diff --git a/vendor/github.com/status-im/status-go/protocol/datasync/datasync.go b/vendor/github.com/status-im/status-go/protocol/datasync/datasync.go index 835a40ebd..a620860ae 100644 --- a/vendor/github.com/status-im/status-go/protocol/datasync/datasync.go +++ b/vendor/github.com/status-im/status-go/protocol/datasync/datasync.go @@ -4,11 +4,12 @@ import ( "crypto/ecdsa" "github.com/golang/protobuf/proto" - datasyncpeer "github.com/status-im/status-go/protocol/datasync/peer" datasyncnode "github.com/vacp2p/mvds/node" datasyncproto "github.com/vacp2p/mvds/protobuf" datasynctransport "github.com/vacp2p/mvds/transport" "go.uber.org/zap" + + datasyncpeer "github.com/status-im/status-go/protocol/datasync/peer" ) type DataSync struct { diff --git a/vendor/github.com/status-im/status-go/protocol/datasync/transport.go b/vendor/github.com/status-im/status-go/protocol/datasync/transport.go index 7aaac0c68..f193870df 100644 --- a/vendor/github.com/status-im/status-go/protocol/datasync/transport.go +++ b/vendor/github.com/status-im/status-go/protocol/datasync/transport.go @@ -4,11 +4,13 @@ import ( "context" "crypto/ecdsa" "errors" + "github.com/golang/protobuf/proto" - datasyncpeer "github.com/status-im/status-go/protocol/datasync/peer" "github.com/vacp2p/mvds/protobuf" "github.com/vacp2p/mvds/state" "github.com/vacp2p/mvds/transport" + + datasyncpeer "github.com/status-im/status-go/protocol/datasync/peer" ) var errNotInitialized = errors.New("Datasync transport not initialized") diff --git a/vendor/github.com/status-im/status-go/protocol/datasync/utils.go b/vendor/github.com/status-im/status-go/protocol/datasync/utils.go index e9f9c5c1a..99cdc3e31 100644 --- a/vendor/github.com/status-im/status-go/protocol/datasync/utils.go +++ b/vendor/github.com/status-im/status-go/protocol/datasync/utils.go @@ -2,8 +2,10 @@ package datasync import ( "crypto/ecdsa" - "github.com/status-im/status-go/eth-node/crypto" + "github.com/vacp2p/mvds/state" + + "github.com/status-im/status-go/eth-node/crypto" ) func ToGroupID(data []byte) state.GroupID { diff --git a/vendor/github.com/status-im/status-go/protocol/encryption/encryptor.go b/vendor/github.com/status-im/status-go/protocol/encryption/encryptor.go index baa0326eb..bbaa788b0 100644 --- a/vendor/github.com/status-im/status-go/protocol/encryption/encryptor.go +++ b/vendor/github.com/status-im/status-go/protocol/encryption/encryptor.go @@ -9,9 +9,10 @@ import ( "time" dr "github.com/status-im/doubleratchet" + "go.uber.org/zap" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/crypto/ecies" - "go.uber.org/zap" "github.com/status-im/status-go/protocol/encryption/multidevice" ) diff --git a/vendor/github.com/status-im/status-go/protocol/encryption/persistence.go b/vendor/github.com/status-im/status-go/protocol/encryption/persistence.go index b2c78e8ae..1cfbd6dc4 100644 --- a/vendor/github.com/status-im/status-go/protocol/encryption/persistence.go +++ b/vendor/github.com/status-im/status-go/protocol/encryption/persistence.go @@ -6,6 +6,7 @@ import ( "strings" dr "github.com/status-im/doubleratchet" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/protocol/encryption/multidevice" diff --git a/vendor/github.com/status-im/status-go/protocol/encryption/protocol_message.pb.go b/vendor/github.com/status-im/status-go/protocol/encryption/protocol_message.pb.go index a682bdb61..81ce4a314 100644 --- a/vendor/github.com/status-im/status-go/protocol/encryption/protocol_message.pb.go +++ b/vendor/github.com/status-im/status-go/protocol/encryption/protocol_message.pb.go @@ -5,8 +5,9 @@ package encryption import ( fmt "fmt" - proto "github.com/golang/protobuf/proto" math "math" + + proto "github.com/golang/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/vendor/github.com/status-im/status-go/protocol/encryption/publisher/publisher.go b/vendor/github.com/status-im/status-go/protocol/encryption/publisher/publisher.go index 75a5923ae..af42e38c6 100644 --- a/vendor/github.com/status-im/status-go/protocol/encryption/publisher/publisher.go +++ b/vendor/github.com/status-im/status-go/protocol/encryption/publisher/publisher.go @@ -5,8 +5,9 @@ import ( "errors" "time" - "github.com/status-im/status-go/eth-node/crypto" "go.uber.org/zap" + + "github.com/status-im/status-go/eth-node/crypto" ) const ( diff --git a/vendor/github.com/status-im/status-go/protocol/encryption/sharedsecret/sharedsecret.go b/vendor/github.com/status-im/status-go/protocol/encryption/sharedsecret/sharedsecret.go index f472a5646..d170f5b65 100644 --- a/vendor/github.com/status-im/status-go/protocol/encryption/sharedsecret/sharedsecret.go +++ b/vendor/github.com/status-im/status-go/protocol/encryption/sharedsecret/sharedsecret.go @@ -6,9 +6,10 @@ import ( "database/sql" "errors" + "go.uber.org/zap" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/crypto/ecies" - "go.uber.org/zap" ) const sskLen = 16 diff --git a/vendor/github.com/status-im/status-go/protocol/identity/identicon/identicon.go b/vendor/github.com/status-im/status-go/protocol/identity/identicon/identicon.go index ec3f86d31..80d8b0462 100644 --- a/vendor/github.com/status-im/status-go/protocol/identity/identicon/identicon.go +++ b/vendor/github.com/status-im/status-go/protocol/identity/identicon/identicon.go @@ -2,8 +2,9 @@ package identicon import ( "crypto/md5" - colorful "github.com/lucasb-eyer/go-colorful" "image/color" + + colorful "github.com/lucasb-eyer/go-colorful" ) const ( diff --git a/vendor/github.com/status-im/status-go/protocol/message.go b/vendor/github.com/status-im/status-go/protocol/message.go index c67837b13..5b805982d 100644 --- a/vendor/github.com/status-im/status-go/protocol/message.go +++ b/vendor/github.com/status-im/status-go/protocol/message.go @@ -8,6 +8,7 @@ import ( "unicode/utf8" "github.com/gomarkdown/markdown" + "github.com/status-im/status-go/protocol/protobuf" ) diff --git a/vendor/github.com/status-im/status-go/protocol/message_processor.go b/vendor/github.com/status-im/status-go/protocol/message_processor.go index 3fc7e8a6c..16011cf62 100644 --- a/vendor/github.com/status-im/status-go/protocol/message_processor.go +++ b/vendor/github.com/status-im/status-go/protocol/message_processor.go @@ -8,6 +8,10 @@ import ( "github.com/golang/protobuf/proto" "github.com/pkg/errors" + datasyncnode "github.com/vacp2p/mvds/node" + datasyncproto "github.com/vacp2p/mvds/protobuf" + "go.uber.org/zap" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/protocol/datasync" @@ -17,9 +21,6 @@ import ( "github.com/status-im/status-go/protocol/protobuf" transport "github.com/status-im/status-go/protocol/transport/whisper" v1protocol "github.com/status-im/status-go/protocol/v1" - datasyncnode "github.com/vacp2p/mvds/node" - datasyncproto "github.com/vacp2p/mvds/protobuf" - "go.uber.org/zap" ) // Whisper message properties. diff --git a/vendor/github.com/status-im/status-go/protocol/message_validator.go b/vendor/github.com/status-im/status-go/protocol/message_validator.go index 845ef0810..43e512919 100644 --- a/vendor/github.com/status-im/status-go/protocol/message_validator.go +++ b/vendor/github.com/status-im/status-go/protocol/message_validator.go @@ -2,8 +2,9 @@ package protocol import ( "errors" - "github.com/status-im/status-go/protocol/protobuf" "strings" + + "github.com/status-im/status-go/protocol/protobuf" ) func ValidateReceivedChatMessage(message *protobuf.ChatMessage) error { diff --git a/vendor/github.com/status-im/status-go/protocol/messenger.go b/vendor/github.com/status-im/status-go/protocol/messenger.go index 420144468..6de0caa22 100644 --- a/vendor/github.com/status-im/status-go/protocol/messenger.go +++ b/vendor/github.com/status-im/status-go/protocol/messenger.go @@ -14,6 +14,7 @@ import ( "go.uber.org/zap" "github.com/golang/protobuf/proto" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" enstypes "github.com/status-im/status-go/eth-node/types/ens" diff --git a/vendor/github.com/status-im/status-go/protocol/persistence_legacy.go b/vendor/github.com/status-im/status-go/protocol/persistence_legacy.go index de530c95c..55975a6ce 100644 --- a/vendor/github.com/status-im/status-go/protocol/persistence_legacy.go +++ b/vendor/github.com/status-im/status-go/protocol/persistence_legacy.go @@ -5,9 +5,10 @@ import ( "database/sql" "encoding/json" "fmt" - "github.com/status-im/status-go/protocol/protobuf" "strings" + "github.com/status-im/status-go/protocol/protobuf" + "github.com/pkg/errors" ) diff --git a/vendor/github.com/status-im/status-go/protocol/protobuf/application_metadata_message.pb.go b/vendor/github.com/status-im/status-go/protocol/protobuf/application_metadata_message.pb.go index ac37121f0..7b439229f 100644 --- a/vendor/github.com/status-im/status-go/protocol/protobuf/application_metadata_message.pb.go +++ b/vendor/github.com/status-im/status-go/protocol/protobuf/application_metadata_message.pb.go @@ -5,8 +5,9 @@ package protobuf import ( fmt "fmt" - proto "github.com/golang/protobuf/proto" math "math" + + proto "github.com/golang/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/vendor/github.com/status-im/status-go/protocol/protobuf/chat_message.pb.go b/vendor/github.com/status-im/status-go/protocol/protobuf/chat_message.pb.go index 25250309a..9963ed524 100644 --- a/vendor/github.com/status-im/status-go/protocol/protobuf/chat_message.pb.go +++ b/vendor/github.com/status-im/status-go/protocol/protobuf/chat_message.pb.go @@ -5,8 +5,9 @@ package protobuf import ( fmt "fmt" - proto "github.com/golang/protobuf/proto" math "math" + + proto "github.com/golang/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/vendor/github.com/status-im/status-go/protocol/protobuf/membership_update_message.pb.go b/vendor/github.com/status-im/status-go/protocol/protobuf/membership_update_message.pb.go index 30dd3d1f2..1e923090d 100644 --- a/vendor/github.com/status-im/status-go/protocol/protobuf/membership_update_message.pb.go +++ b/vendor/github.com/status-im/status-go/protocol/protobuf/membership_update_message.pb.go @@ -5,8 +5,9 @@ package protobuf import ( fmt "fmt" - proto "github.com/golang/protobuf/proto" math "math" + + proto "github.com/golang/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/vendor/github.com/status-im/status-go/protocol/protobuf/pubkey.go b/vendor/github.com/status-im/status-go/protocol/protobuf/pubkey.go index 72212903b..77f01624a 100644 --- a/vendor/github.com/status-im/status-go/protocol/protobuf/pubkey.go +++ b/vendor/github.com/status-im/status-go/protocol/protobuf/pubkey.go @@ -2,6 +2,7 @@ package protobuf import ( "crypto/ecdsa" + "github.com/status-im/status-go/eth-node/crypto" ) diff --git a/vendor/github.com/status-im/status-go/protocol/transport/whisper/envelopes.go b/vendor/github.com/status-im/status-go/protocol/transport/whisper/envelopes.go index 255406410..21da4df38 100644 --- a/vendor/github.com/status-im/status-go/protocol/transport/whisper/envelopes.go +++ b/vendor/github.com/status-im/status-go/protocol/transport/whisper/envelopes.go @@ -5,8 +5,9 @@ import ( "errors" "sync" - "github.com/status-im/status-go/eth-node/types" "go.uber.org/zap" + + "github.com/status-im/status-go/eth-node/types" ) // EnvelopeState in local tracker diff --git a/vendor/github.com/status-im/status-go/protocol/transport/whisper/filter.go b/vendor/github.com/status-im/status-go/protocol/transport/whisper/filter.go index 0074015ee..e237d78f2 100644 --- a/vendor/github.com/status-im/status-go/protocol/transport/whisper/filter.go +++ b/vendor/github.com/status-im/status-go/protocol/transport/whisper/filter.go @@ -9,9 +9,10 @@ import ( "sync" "github.com/pkg/errors" + "go.uber.org/zap" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" - "go.uber.org/zap" ) const ( diff --git a/vendor/github.com/status-im/status-go/protocol/v1/membership_update_message.go b/vendor/github.com/status-im/status-go/protocol/v1/membership_update_message.go index 1a04065e8..2e1bed012 100644 --- a/vendor/github.com/status-im/status-go/protocol/v1/membership_update_message.go +++ b/vendor/github.com/status-im/status-go/protocol/v1/membership_update_message.go @@ -11,6 +11,7 @@ import ( "github.com/golang/protobuf/proto" "github.com/google/uuid" "github.com/pkg/errors" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/protocol/protobuf" diff --git a/vendor/github.com/status-im/status-go/protocol/v1/message.go b/vendor/github.com/status-im/status-go/protocol/v1/message.go index df7b7c37e..d3607fe5e 100644 --- a/vendor/github.com/status-im/status-go/protocol/v1/message.go +++ b/vendor/github.com/status-im/status-go/protocol/v1/message.go @@ -6,6 +6,7 @@ import ( "github.com/golang/protobuf/proto" "github.com/pkg/errors" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/protocol/protobuf" diff --git a/vendor/github.com/status-im/status-go/protocol/v1/status_message.go b/vendor/github.com/status-im/status-go/protocol/v1/status_message.go index 656509c1b..aa9a9cc77 100644 --- a/vendor/github.com/status-im/status-go/protocol/v1/status_message.go +++ b/vendor/github.com/status-im/status-go/protocol/v1/status_message.go @@ -8,6 +8,7 @@ import ( "github.com/golang/protobuf/proto" "github.com/jinzhu/copier" "github.com/pkg/errors" + "github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/protocol/datasync" diff --git a/vendor/github.com/status-im/status-go/whisper/v6/peer.go b/vendor/github.com/status-im/status-go/whisper/v6/peer.go index 539af91dc..8abad55aa 100644 --- a/vendor/github.com/status-im/status-go/whisper/v6/peer.go +++ b/vendor/github.com/status-im/status-go/whisper/v6/peer.go @@ -24,6 +24,7 @@ import ( "time" mapset "github.com/deckarep/golang-set" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" diff --git a/vendor/github.com/status-im/status-go/whisper/v6/rate_limiter.go b/vendor/github.com/status-im/status-go/whisper/v6/rate_limiter.go index 288deef18..02a1f302e 100644 --- a/vendor/github.com/status-im/status-go/whisper/v6/rate_limiter.go +++ b/vendor/github.com/status-im/status-go/whisper/v6/rate_limiter.go @@ -6,9 +6,10 @@ import ( "fmt" "time" + "github.com/tsenart/tb" + "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/tsenart/tb" ) type runLoop func(p *Peer, rw p2p.MsgReadWriter) error diff --git a/vendor/github.com/status-im/status-go/whisper/v6/whisper.go b/vendor/github.com/status-im/status-go/whisper/v6/whisper.go index 1f30ce3db..cff9dcf54 100644 --- a/vendor/github.com/status-im/status-go/whisper/v6/whisper.go +++ b/vendor/github.com/status-im/status-go/whisper/v6/whisper.go @@ -30,6 +30,9 @@ import ( "time" mapset "github.com/deckarep/golang-set" + "golang.org/x/crypto/pbkdf2" + "golang.org/x/sync/syncmap" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/event" @@ -38,8 +41,6 @@ import ( "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" - "golang.org/x/crypto/pbkdf2" - "golang.org/x/sync/syncmap" ) // TimeSyncError error for clock skew errors. diff --git a/waku/api.go b/waku/api.go index db89ffa45..ef49fe1ce 100644 --- a/waku/api.go +++ b/waku/api.go @@ -26,11 +26,12 @@ import ( "sync" "time" + "github.com/prometheus/common/log" + "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/rpc" - "github.com/prometheus/common/log" ) // List of errors diff --git a/waku/doc_test.go b/waku/doc_test.go index af47edd30..7e9f10913 100644 --- a/waku/doc_test.go +++ b/waku/doc_test.go @@ -21,9 +21,10 @@ package waku import ( "testing" + "github.com/stretchr/testify/require" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/rlp" - "github.com/stretchr/testify/require" ) func TestEncodeDecodeVersionedResponse(t *testing.T) { diff --git a/waku/message.go b/waku/message.go index 1f7722092..91848b4a6 100644 --- a/waku/message.go +++ b/waku/message.go @@ -29,10 +29,11 @@ import ( "strconv" "time" + "github.com/prometheus/common/log" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto/ecies" - "github.com/prometheus/common/log" ) // MessageParams specifies the exact way a message should be wrapped diff --git a/waku/peer.go b/waku/peer.go index 34f1592ed..92506173e 100644 --- a/waku/peer.go +++ b/waku/peer.go @@ -26,11 +26,12 @@ import ( "time" mapset "github.com/deckarep/golang-set" + "go.uber.org/zap" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/rlp" - "go.uber.org/zap" ) // Peer represents a waku protocol peer connection. diff --git a/waku/rate_limiter.go b/waku/rate_limiter.go index 9443ba9aa..2ea260f80 100644 --- a/waku/rate_limiter.go +++ b/waku/rate_limiter.go @@ -24,9 +24,10 @@ import ( "fmt" "time" + "github.com/tsenart/tb" + "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/tsenart/tb" ) type runLoop func(p *Peer, rw p2p.MsgReadWriter) error diff --git a/waku/rate_limiter_test.go b/waku/rate_limiter_test.go index 4d0616486..96c7b7599 100644 --- a/waku/rate_limiter_test.go +++ b/waku/rate_limiter_test.go @@ -23,9 +23,10 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/stretchr/testify/require" ) func TestPeerRateLimiterDecorator(t *testing.T) { diff --git a/waku/waku.go b/waku/waku.go index 7c58a47d2..98ad566ed 100644 --- a/waku/waku.go +++ b/waku/waku.go @@ -36,6 +36,8 @@ import ( "go.uber.org/zap" mapset "github.com/deckarep/golang-set" + "golang.org/x/crypto/pbkdf2" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/event" @@ -44,7 +46,6 @@ import ( "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" - "golang.org/x/crypto/pbkdf2" ) // TimeSyncError error for clock skew errors. diff --git a/waku/waku_test.go b/waku/waku_test.go index 3538c9069..eab3960b6 100644 --- a/waku/waku_test.go +++ b/waku/waku_test.go @@ -28,14 +28,15 @@ import ( "testing" "time" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + "golang.org/x/crypto/pbkdf2" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/rlp" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - "golang.org/x/crypto/pbkdf2" ) func TestBasic(t *testing.T) { diff --git a/whisper/benchmarks_test.go b/whisper/benchmarks_test.go index 58129214d..a7bcc8b24 100644 --- a/whisper/benchmarks_test.go +++ b/whisper/benchmarks_test.go @@ -21,8 +21,9 @@ import ( "testing" "time" - "github.com/ethereum/go-ethereum/crypto" "golang.org/x/crypto/pbkdf2" + + "github.com/ethereum/go-ethereum/crypto" ) func BenchmarkDeriveKeyMaterial(b *testing.B) { diff --git a/whisper/doc_test.go b/whisper/doc_test.go index 1322d5e0c..d65fb08b1 100644 --- a/whisper/doc_test.go +++ b/whisper/doc_test.go @@ -3,10 +3,11 @@ package whisper import ( "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/rlp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/rlp" ) func TestSyncMailRequestValidate(t *testing.T) { diff --git a/whisper/mailserver_response_test.go b/whisper/mailserver_response_test.go index b78ce9a00..61a20963b 100644 --- a/whisper/mailserver_response_test.go +++ b/whisper/mailserver_response_test.go @@ -4,10 +4,11 @@ import ( "encoding/binary" "testing" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/p2p/enode" "github.com/stretchr/testify/require" "github.com/syndtr/goleveldb/leveldb/errors" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/p2p/enode" ) func checkValidErrorPayload(t *testing.T, id []byte, errorMsg string) { diff --git a/whisper/peer.go b/whisper/peer.go index 539af91dc..8abad55aa 100644 --- a/whisper/peer.go +++ b/whisper/peer.go @@ -24,6 +24,7 @@ import ( "time" mapset "github.com/deckarep/golang-set" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" diff --git a/whisper/rate_limiter.go b/whisper/rate_limiter.go index 288deef18..02a1f302e 100644 --- a/whisper/rate_limiter.go +++ b/whisper/rate_limiter.go @@ -6,9 +6,10 @@ import ( "fmt" "time" + "github.com/tsenart/tb" + "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/tsenart/tb" ) type runLoop func(p *Peer, rw p2p.MsgReadWriter) error diff --git a/whisper/rate_limiter_test.go b/whisper/rate_limiter_test.go index b083894a9..e6ec3f75a 100644 --- a/whisper/rate_limiter_test.go +++ b/whisper/rate_limiter_test.go @@ -7,8 +7,9 @@ import ( "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/ethereum/go-ethereum/p2p" "github.com/stretchr/testify/require" + + "github.com/ethereum/go-ethereum/p2p" ) func TestPeerRateLimiterDecorator(t *testing.T) { diff --git a/whisper/shhclient/client.go b/whisper/shhclient/client.go index cff16cf11..113b9a7c9 100644 --- a/whisper/shhclient/client.go +++ b/whisper/shhclient/client.go @@ -22,6 +22,7 @@ import ( "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/rpc" + "github.com/status-im/status-go/whisper/v6" ) diff --git a/whisper/whisper.go b/whisper/whisper.go index 1f30ce3db..cff9dcf54 100644 --- a/whisper/whisper.go +++ b/whisper/whisper.go @@ -30,6 +30,9 @@ import ( "time" mapset "github.com/deckarep/golang-set" + "golang.org/x/crypto/pbkdf2" + "golang.org/x/sync/syncmap" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/event" @@ -38,8 +41,6 @@ import ( "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" - "golang.org/x/crypto/pbkdf2" - "golang.org/x/sync/syncmap" ) // TimeSyncError error for clock skew errors. diff --git a/whisper/whisper_test.go b/whisper/whisper_test.go index 00f22b36b..343addfef 100644 --- a/whisper/whisper_test.go +++ b/whisper/whisper_test.go @@ -25,15 +25,16 @@ import ( "testing" "time" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + "github.com/syndtr/goleveldb/leveldb/errors" + "golang.org/x/crypto/pbkdf2" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/rlp" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - "github.com/syndtr/goleveldb/leveldb/errors" - "golang.org/x/crypto/pbkdf2" ) func TestWhisperBasic(t *testing.T) {