Use goimports instead of gofmt

This commit is contained in:
Pedro Pombeiro 2020-01-02 10:10:19 +01:00 committed by Pedro Pombeiro
parent 3eaacaa2f4
commit c8a911ebd1
266 changed files with 602 additions and 271 deletions

View File

@ -2,13 +2,14 @@ run:
concurrency: 4 concurrency: 4
deadline: 1m deadline: 1m
issues-exit-code: 1 issues-exit-code: 1
modules-download-mode: vendor
tests: true tests: true
skip-dirs: skip-dirs:
- static - static
- vendor
skip-files: skip-files:
- bindata.go - bindata.go
- .*_mock.go - .*_mock.go
- jail/doc.go
- contracts/ - contracts/
output: output:
@ -26,6 +27,8 @@ linters-settings:
min-confidence: 0.8 min-confidence: 0.8
gofmt: gofmt:
simplify: true simplify: true
goimports:
local-prefixes: github.com/ethereum/go-ethereum,github.com/status-im/status-go
gocyclo: gocyclo:
min-complexity: 16 min-complexity: 16
maligned: maligned:
@ -44,7 +47,7 @@ linters:
- gosec - gosec
- goconst - goconst
- gocyclo - gocyclo
- gofmt - goimports
- golint - golint
- govet - govet
- ineffassign - ineffassign

View File

@ -177,7 +177,8 @@ clean-release:
rm -rf $(RELEASE_DIR) rm -rf $(RELEASE_DIR)
gofmt: 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: check-existing-release:
@git ls-remote --exit-code origin "v$(RELEASE_TAG)" >/dev/null || exit 0; \ @git ls-remote --exit-code origin "v$(RELEASE_TAG)" >/dev/null || exit 0; \

View File

@ -4,6 +4,7 @@ package account
import ( import (
"github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts"
"github.com/status-im/status-go/account/generator" "github.com/status-im/status-go/account/generator"
) )

View File

@ -3,9 +3,10 @@ package account
import ( import (
"testing" "testing"
"github.com/stretchr/testify/require"
"github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/crypto"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
"github.com/stretchr/testify/require"
) )
func TestCreateAddress(t *testing.T) { func TestCreateAddress(t *testing.T) {

View File

@ -7,8 +7,10 @@ import (
"strings" "strings"
"sync" "sync"
"github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/pborman/uuid" "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/crypto"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/extkeys" "github.com/status-im/status-go/extkeys"

View File

@ -5,8 +5,9 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/ethereum/go-ethereum/crypto"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/ethereum/go-ethereum/crypto"
) )
var testAccount = struct { var testAccount = struct {

View File

@ -3,10 +3,11 @@ package generator
import ( import (
"testing" "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/assert"
"github.com/stretchr/testify/require" "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 { func generateTestKey(t *testing.T) *extkeys.ExtendedKey {

View File

@ -8,6 +8,7 @@ import (
"github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/accounts/keystore"
gethbridge "github.com/status-im/status-go/eth-node/bridge/geth" 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/eth-node/types"
) )

View File

@ -4,6 +4,7 @@ import (
"fmt" "fmt"
"github.com/pborman/uuid" "github.com/pborman/uuid"
"github.com/status-im/status-go/account/generator" "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/crypto"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"

View File

@ -4,12 +4,13 @@ package account
import ( import (
"testing" "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/account/generator"
"github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/crypto"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/extkeys" "github.com/status-im/status-go/extkeys"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
) )
type AccountUtilsTestSuite struct { type AccountUtilsTestSuite struct {

View File

@ -6,13 +6,14 @@ import (
"testing" "testing"
"time" "time"
"github.com/stretchr/testify/require"
"github.com/status-im/status-go/account" "github.com/status-im/status-go/account"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/node" "github.com/status-im/status-go/node"
"github.com/status-im/status-go/params" "github.com/status-im/status-go/params"
"github.com/status-im/status-go/signal" "github.com/status-im/status-go/signal"
"github.com/status-im/status-go/t/utils" "github.com/status-im/status-go/t/utils"
"github.com/stretchr/testify/require"
) )
const ( const (

View File

@ -12,7 +12,11 @@ import (
"sync" "sync"
"testing" "testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
gethcrypto "github.com/ethereum/go-ethereum/crypto" gethcrypto "github.com/ethereum/go-ethereum/crypto"
"github.com/status-im/status-go/account" "github.com/status-im/status-go/account"
"github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/crypto"
"github.com/status-im/status-go/eth-node/types" "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/services/typeddata"
"github.com/status-im/status-go/t/utils" "github.com/status-im/status-go/t/utils"
"github.com/status-im/status-go/transactions" "github.com/status-im/status-go/transactions"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
) )
var ( var (

View File

@ -18,6 +18,7 @@ import (
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
gethnode "github.com/ethereum/go-ethereum/node" gethnode "github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enode"
"github.com/status-im/status-go/account" "github.com/status-im/status-go/account"
"github.com/status-im/status-go/appdatabase" "github.com/status-im/status-go/appdatabase"
"github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/crypto"

View File

@ -4,12 +4,13 @@ import (
"fmt" "fmt"
"testing" "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/eth-node/crypto"
"github.com/status-im/status-go/params" "github.com/status-im/status-go/params"
"github.com/status-im/status-go/services/personal" "github.com/status-im/status-go/services/personal"
"github.com/status-im/status-go/t/utils" "github.com/status-im/status-go/t/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
) )
func TestHashMessage(t *testing.T) { func TestHashMessage(t *testing.T) {

View File

@ -4,6 +4,7 @@ import (
"database/sql" "database/sql"
bindata "github.com/status-im/migrate/v4/source/go_bindata" bindata "github.com/status-im/migrate/v4/source/go_bindata"
"github.com/status-im/status-go/sqlite" "github.com/status-im/status-go/sqlite"
) )

View File

@ -12,9 +12,13 @@ import (
"path/filepath" "path/filepath"
"time" "time"
"golang.org/x/crypto/sha3"
"golang.org/x/crypto/ssh/terminal"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enode"
"github.com/status-im/status-go/api" "github.com/status-im/status-go/api"
gethbridge "github.com/status-im/status-go/eth-node/bridge/geth" 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/eth-node/types"
@ -23,8 +27,6 @@ import (
"github.com/status-im/status-go/rpc" "github.com/status-im/status-go/rpc"
"github.com/status-im/status-go/services/shhext" "github.com/status-im/status-go/services/shhext"
"github.com/status-im/status-go/t/helpers" "github.com/status-im/status-go/t/helpers"
"golang.org/x/crypto/sha3"
"golang.org/x/crypto/ssh/terminal"
) )
const ( const (

View File

@ -4,8 +4,9 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/status-im/status-go/params"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/status-im/status-go/params"
) )
// nolint: deadcode // nolint: deadcode

View File

@ -13,9 +13,12 @@ import (
"strings" "strings"
"time" "time"
"github.com/okzk/sdnotify"
"golang.org/x/crypto/ssh/terminal"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
gethmetrics "github.com/ethereum/go-ethereum/metrics" gethmetrics "github.com/ethereum/go-ethereum/metrics"
"github.com/okzk/sdnotify"
"github.com/status-im/status-go/api" "github.com/status-im/status-go/api"
"github.com/status-im/status-go/logutils" "github.com/status-im/status-go/logutils"
"github.com/status-im/status-go/metrics" "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/node"
"github.com/status-im/status-go/params" "github.com/status-im/status-go/params"
"github.com/status-im/status-go/profiling" "github.com/status-im/status-go/profiling"
"golang.org/x/crypto/ssh/terminal"
) )
const ( const (

View File

@ -6,6 +6,7 @@ import (
"strings" "strings"
"github.com/ethereum/go-ethereum/p2p/discv5" "github.com/ethereum/go-ethereum/p2p/discv5"
"github.com/status-im/status-go/params" "github.com/status-im/status-go/params"
) )

View File

@ -3,8 +3,9 @@ package topics
import ( import (
"testing" "testing"
"github.com/status-im/status-go/params"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/status-im/status-go/params"
) )
func TestTopicFlags(t *testing.T) { func TestTopicFlags(t *testing.T) {

View File

@ -27,6 +27,7 @@ import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto"
"github.com/status-im/status-go/contracts/ens/contract" "github.com/status-im/status-go/contracts/ens/contract"
) )

View File

@ -25,6 +25,7 @@ import (
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto"
"github.com/status-im/status-go/contracts/ens/contract" "github.com/status-im/status-go/contracts/ens/contract"
) )

View File

@ -3,13 +3,14 @@ package db
import ( import (
"path/filepath" "path/filepath"
"github.com/ethereum/go-ethereum/log"
"github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/errors" "github.com/syndtr/goleveldb/leveldb/errors"
"github.com/syndtr/goleveldb/leveldb/iterator" "github.com/syndtr/goleveldb/leveldb/iterator"
"github.com/syndtr/goleveldb/leveldb/opt" "github.com/syndtr/goleveldb/leveldb/opt"
"github.com/syndtr/goleveldb/leveldb/storage" "github.com/syndtr/goleveldb/leveldb/storage"
"github.com/syndtr/goleveldb/leveldb/util" "github.com/syndtr/goleveldb/leveldb/util"
"github.com/ethereum/go-ethereum/log"
) )
type storagePrefix byte type storagePrefix byte

View File

@ -6,8 +6,9 @@ import (
"errors" "errors"
"time" "time"
"github.com/status-im/status-go/eth-node/types"
"github.com/syndtr/goleveldb/leveldb/util" "github.com/syndtr/goleveldb/leveldb/util"
"github.com/status-im/status-go/eth-node/types"
) )
var ( var (

View File

@ -3,8 +3,9 @@ package db
import ( import (
"time" "time"
"github.com/status-im/status-go/eth-node/types"
"github.com/syndtr/goleveldb/leveldb/errors" "github.com/syndtr/goleveldb/leveldb/errors"
"github.com/status-im/status-go/eth-node/types"
) )
// NewHistoryStore returns HistoryStore instance. // NewHistoryStore returns HistoryStore instance.

View File

@ -4,8 +4,9 @@ import (
"testing" "testing"
"time" "time"
"github.com/status-im/status-go/eth-node/types"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/status-im/status-go/eth-node/types"
) )
func createInMemStore(t *testing.T) HistoryStore { func createInMemStore(t *testing.T) HistoryStore {

View File

@ -4,8 +4,9 @@ import (
"testing" "testing"
"time" "time"
"github.com/status-im/status-go/eth-node/types"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/status-im/status-go/eth-node/types"
) )
func TestTopicHistoryStoreLoadFromKey(t *testing.T) { func TestTopicHistoryStoreLoadFromKey(t *testing.T) {

View File

@ -6,8 +6,9 @@ import (
"testing" "testing"
"time" "time"
"github.com/ethereum/go-ethereum/p2p/discv5"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/ethereum/go-ethereum/p2p/discv5"
) )
func newRegistry() *registry { func newRegistry() *registry {

View File

@ -9,12 +9,13 @@ import (
"sync" "sync"
"time" "time"
ma "github.com/multiformats/go-multiaddr"
"github.com/status-im/rendezvous"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/p2p/discv5" "github.com/ethereum/go-ethereum/p2p/discv5"
"github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enode"
"github.com/ethereum/go-ethereum/p2p/enr" "github.com/ethereum/go-ethereum/p2p/enr"
ma "github.com/multiformats/go-multiaddr"
"github.com/status-im/rendezvous"
) )
const ( const (

View File

@ -5,10 +5,6 @@ import (
"testing" "testing"
"time" "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" lcrypto "github.com/libp2p/go-libp2p-core/crypto"
ma "github.com/multiformats/go-multiaddr" ma "github.com/multiformats/go-multiaddr"
"github.com/status-im/rendezvous/server" "github.com/status-im/rendezvous/server"
@ -16,6 +12,11 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/storage" "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 { func makeTestRendezvousServer(t *testing.T, addr string) *server.Server {

View File

@ -8,11 +8,13 @@ import (
"math/big" "math/big"
"time" "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" ens "github.com/wealdtech/go-ens/v3"
"go.uber.org/zap" "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 ( const (

View File

@ -8,6 +8,7 @@ import (
"github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/extkeys" "github.com/status-im/status-go/extkeys"
) )

View File

@ -1,13 +1,15 @@
package gethbridge package gethbridge
import ( import (
"go.uber.org/zap"
"github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enode"
gethens "github.com/status-im/status-go/eth-node/bridge/geth/ens" gethens "github.com/status-im/status-go/eth-node/bridge/geth/ens"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
enstypes "github.com/status-im/status-go/eth-node/types/ens" enstypes "github.com/status-im/status-go/eth-node/types/ens"
"github.com/status-im/status-go/whisper/v6" "github.com/status-im/status-go/whisper/v6"
"go.uber.org/zap"
) )
type gethNodeWrapper struct { type gethNodeWrapper struct {

View File

@ -4,6 +4,7 @@ import (
"context" "context"
"github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/hexutil"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/whisper/v6" "github.com/status-im/status-go/whisper/v6"
) )

View File

@ -2,6 +2,7 @@ package gethbridge
import ( import (
"github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/event"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
) )

View File

@ -24,10 +24,11 @@ import (
"time" "time"
"unsafe" "unsafe"
"go.uber.org/zap"
"github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/crypto"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
enstypes "github.com/status-im/status-go/eth-node/types/ens" enstypes "github.com/status-im/status-go/eth-node/types/ens"
"go.uber.org/zap"
) )
type nimbusNodeWrapper struct { type nimbusNodeWrapper struct {

View File

@ -24,6 +24,7 @@ import (
"unsafe" "unsafe"
gopointer "github.com/mattn/go-pointer" gopointer "github.com/mattn/go-pointer"
"github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/crypto"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
) )

View File

@ -2,8 +2,9 @@ package crypto
import ( import (
"encoding/hex" "encoding/hex"
"github.com/stretchr/testify/require"
"testing" "testing"
"github.com/stretchr/testify/require"
) )
func TestExtractSignatures(t *testing.T) { func TestExtractSignatures(t *testing.T) {

View File

@ -10,8 +10,9 @@ import (
"io" "io"
dr "github.com/status-im/doubleratchet" dr "github.com/status-im/doubleratchet"
"github.com/status-im/status-go/eth-node/crypto/ecies"
"golang.org/x/crypto/hkdf" "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 // EthereumCrypto is an implementation of Crypto with cryptographic primitives recommended

View File

@ -28,11 +28,13 @@ import (
"math/big" "math/big"
"os" "os"
"golang.org/x/crypto/sha3"
"github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/crypto/secp256k1" "github.com/ethereum/go-ethereum/crypto/secp256k1"
"github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rlp"
"github.com/status-im/status-go/eth-node/types" "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. //SignatureLength indicates the byte length required to carry a signature with recovery id.

View File

@ -13,11 +13,12 @@ import (
"fmt" "fmt"
"github.com/pborman/uuid" "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/crypto"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/extkeys" "github.com/status-im/status-go/extkeys"
"golang.org/x/crypto/pbkdf2"
"golang.org/x/crypto/scrypt"
) )
const ( const (

View File

@ -4,6 +4,7 @@ import (
"crypto/ecdsa" "crypto/ecdsa"
"github.com/pborman/uuid" "github.com/pborman/uuid"
"github.com/status-im/status-go/extkeys" "github.com/status-im/status-go/extkeys"
) )

View File

@ -3,8 +3,9 @@ package types
import ( import (
"fmt" "fmt"
enstypes "github.com/status-im/status-go/eth-node/types/ens"
"go.uber.org/zap" "go.uber.org/zap"
enstypes "github.com/status-im/status-go/eth-node/types/ens"
) )
// EnodeID is a unique identifier for each node. // EnodeID is a unique identifier for each node.

View File

@ -9,6 +9,7 @@ import (
"testing" "testing"
"github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg"
"github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto"
) )

View File

@ -10,6 +10,8 @@ import (
"os" "os"
"unsafe" "unsafe"
validator "gopkg.in/go-playground/validator.v9"
"github.com/status-im/status-go/api" "github.com/status-im/status-go/api"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/exportlogs" "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/services/typeddata"
"github.com/status-im/status-go/signal" "github.com/status-im/status-go/signal"
"github.com/status-im/status-go/transactions" "github.com/status-im/status-go/transactions"
validator "gopkg.in/go-playground/validator.v9"
) )
// OpenAccounts opens database and returns accounts list. // OpenAccounts opens database and returns accounts list.

View File

@ -13,9 +13,10 @@ import (
"strconv" "strconv"
"testing" "testing"
. "github.com/status-im/status-go/t/utils" //nolint: golint
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
. "github.com/status-im/status-go/t/utils" //nolint: golint
) )
func TestMain(m *testing.M) { func TestMain(m *testing.M) {

View File

@ -15,6 +15,7 @@ import (
"testing" "testing"
"github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/event"
"github.com/status-im/status-go/account/generator" "github.com/status-im/status-go/account/generator"
) )

View File

@ -23,8 +23,11 @@ import (
"testing" "testing"
"time" "time"
"github.com/stretchr/testify/require"
"github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/event"
"github.com/status-im/status-go/account" "github.com/status-im/status-go/account"
"github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/crypto"
"github.com/status-im/status-go/eth-node/keystore" "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/signal"
. "github.com/status-im/status-go/t/utils" //nolint: golint . "github.com/status-im/status-go/t/utils" //nolint: golint
"github.com/status-im/status-go/transactions" "github.com/status-im/status-go/transactions"
"github.com/stretchr/testify/require"
) )
var ( var (

View File

@ -4,6 +4,7 @@ import (
"encoding/json" "encoding/json"
"github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/status-im/status-go/account" "github.com/status-im/status-go/account"
"github.com/status-im/status-go/transactions" "github.com/status-im/status-go/transactions"
) )

View File

@ -1,8 +1,9 @@
package logutils package logutils
import ( import (
"github.com/ethereum/go-ethereum/log"
lumberjack "gopkg.in/natefinch/lumberjack.v2" lumberjack "gopkg.in/natefinch/lumberjack.v2"
"github.com/ethereum/go-ethereum/log"
) )
// FileOptions are all options supported by internal rotation module. // FileOptions are all options supported by internal rotation module.

View File

@ -5,6 +5,7 @@ import (
"strings" "strings"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/status-im/status-go/params" "github.com/status-im/status-go/params"
) )

View File

@ -2,13 +2,15 @@ package logutils
import ( import (
"fmt" "fmt"
"github.com/ethereum/go-ethereum/log"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"math" "math"
"sync" "sync"
"time" "time"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"github.com/ethereum/go-ethereum/log"
"github.com/status-im/status-go/protocol/zaputil" "github.com/status-im/status-go/protocol/zaputil"
) )

View File

@ -3,10 +3,12 @@ package logutils
import ( import (
"bytes" "bytes"
"errors" "errors"
"github.com/ethereum/go-ethereum/log" "testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"go.uber.org/zap" "go.uber.org/zap"
"testing"
"github.com/ethereum/go-ethereum/log"
) )
func TestNewZapAdapter(t *testing.T) { func TestNewZapAdapter(t *testing.T) {

View File

@ -5,12 +5,14 @@ import (
"testing" "testing"
"time" "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/stretchr/testify/require"
"github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/storage" "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) { func TestCleaner(t *testing.T) {

View File

@ -3,8 +3,9 @@ package mailserver
import ( import (
"testing" "testing"
"github.com/status-im/status-go/eth-node/types"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/status-im/status-go/eth-node/types"
) )
func TestNewDBKey(t *testing.T) { func TestNewDBKey(t *testing.T) {

View File

@ -29,6 +29,7 @@ import (
"github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rlp"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/params" "github.com/status-im/status-go/params"
"github.com/status-im/status-go/whisper/v6" "github.com/status-im/status-go/whisper/v6"

View File

@ -4,15 +4,17 @@ import (
"fmt" "fmt"
"time" "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"
"github.com/syndtr/goleveldb/leveldb/errors" "github.com/syndtr/goleveldb/leveldb/errors"
"github.com/syndtr/goleveldb/leveldb/iterator" "github.com/syndtr/goleveldb/leveldb/iterator"
"github.com/syndtr/goleveldb/leveldb/util" "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 { type LevelDB struct {

View File

@ -10,11 +10,13 @@ import (
"github.com/status-im/migrate/v4" "github.com/status-im/migrate/v4"
"github.com/status-im/migrate/v4/database/postgres" "github.com/status-im/migrate/v4/database/postgres"
bindata "github.com/status-im/migrate/v4/source/go_bindata" bindata "github.com/status-im/migrate/v4/source/go_bindata"
"github.com/status-im/status-go/mailserver/migrations" "github.com/status-im/status-go/mailserver/migrations"
"github.com/status-im/status-go/params" "github.com/status-im/status-go/params"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rlp"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/whisper/v6" "github.com/status-im/status-go/whisper/v6"
) )

View File

@ -29,13 +29,15 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rlp"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/params" "github.com/status-im/status-go/params"
"github.com/status-im/status-go/whisper/v6" "github.com/status-im/status-go/whisper/v6"
"github.com/stretchr/testify/suite"
) )
const powRequirement = 0.00001 const powRequirement = 0.00001

View File

@ -7,13 +7,14 @@ import (
"math/big" "math/big"
"testing" "testing"
"github.com/stretchr/testify/suite"
"github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/accounts/abi/bind/backends" "github.com/ethereum/go-ethereum/accounts/abi/bind/backends"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enode"
"github.com/stretchr/testify/suite"
) )
type VerifierTestSuite struct { type VerifierTestSuite struct {

View File

@ -3,9 +3,10 @@ package node
import ( import (
"testing" "testing"
"github.com/stretchr/testify/require"
"github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p"
"github.com/stretchr/testify/require"
prom "github.com/prometheus/client_golang/prometheus" prom "github.com/prometheus/client_golang/prometheus"
) )

View File

@ -4,8 +4,9 @@ import (
"context" "context"
"testing" "testing"
"github.com/ethereum/go-ethereum/node"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/ethereum/go-ethereum/node"
) )
func TestSubscribeServerEventsWithoutServer(t *testing.T) { func TestSubscribeServerEventsWithoutServer(t *testing.T) {

View File

@ -4,6 +4,7 @@ import (
"encoding/json" "encoding/json"
"github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/status-im/status-go/account" "github.com/status-im/status-go/account"
"github.com/status-im/status-go/transactions" "github.com/status-im/status-go/transactions"
) )

View File

@ -8,7 +8,10 @@ import (
"os" "os"
"unsafe" "unsafe"
validator "gopkg.in/go-playground/validator.v9"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/status-im/status-go/api" "github.com/status-im/status-go/api"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/exportlogs" "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/services/typeddata"
"github.com/status-im/status-go/signal" "github.com/status-im/status-go/signal"
"github.com/status-im/status-go/transactions" "github.com/status-im/status-go/transactions"
validator "gopkg.in/go-playground/validator.v9"
) )
var statusBackend = api.NewGethStatusBackend() var statusBackend = api.NewGethStatusBackend()

View File

@ -7,10 +7,11 @@ import (
"os" "os"
"testing" "testing"
"github.com/stretchr/testify/require"
"github.com/status-im/status-go/appdatabase" "github.com/status-im/status-go/appdatabase"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/params" "github.com/status-im/status-go/params"
"github.com/stretchr/testify/require"
) )
var ( var (

View File

@ -4,6 +4,7 @@ import (
"database/sql" "database/sql"
bindata "github.com/status-im/migrate/v4/source/go_bindata" bindata "github.com/status-im/migrate/v4/source/go_bindata"
"github.com/status-im/status-go/sqlite" "github.com/status-im/status-go/sqlite"
) )

View File

@ -9,6 +9,8 @@ import (
"path/filepath" "path/filepath"
"time" "time"
"github.com/syndtr/goleveldb/leveldb"
"github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts"
gethcommon "github.com/ethereum/go-ethereum/common" gethcommon "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core"
@ -22,6 +24,7 @@ import (
"github.com/ethereum/go-ethereum/p2p/discv5" "github.com/ethereum/go-ethereum/p2p/discv5"
"github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enode"
"github.com/ethereum/go-ethereum/p2p/nat" "github.com/ethereum/go-ethereum/p2p/nat"
gethbridge "github.com/status-im/status-go/eth-node/bridge/geth" 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/crypto"
"github.com/status-im/status-go/mailserver" "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/static"
"github.com/status-im/status-go/timesource" "github.com/status-im/status-go/timesource"
"github.com/status-im/status-go/whisper/v6" "github.com/status-im/status-go/whisper/v6"
"github.com/syndtr/goleveldb/leveldb"
) )
// Errors related to node and services creation. // Errors related to node and services creation.

View File

@ -5,9 +5,10 @@ import (
"github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts"
"github.com/stretchr/testify/require"
"github.com/status-im/status-go/params" "github.com/status-im/status-go/params"
"github.com/status-im/status-go/whisper/v6" "github.com/status-im/status-go/whisper/v6"
"github.com/stretchr/testify/require"
) )
func TestWhisperLightModeEnabledSetsEmptyBloomFilter(t *testing.T) { func TestWhisperLightModeEnabledSetsEmptyBloomFilter(t *testing.T) {

View File

@ -4,14 +4,16 @@ import (
"net" "net"
"testing" "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/stretchr/testify/require"
"github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/storage" "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" var enode1 = "enode://f32efef2739e5135a0f9a80600b321ba4d13393a5f1d3f5f593df85919262f06c70bfa66d38507b9d79a91021f5e200ec20150592e72934c66248e87014c4317@1.1.1.1:30404"

View File

@ -12,6 +12,9 @@ import (
"sync" "sync"
"time" "time"
ma "github.com/multiformats/go-multiaddr"
"github.com/syndtr/goleveldb/leveldb"
"github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/les" "github.com/ethereum/go-ethereum/les"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
@ -19,9 +22,8 @@ import (
"github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enode"
"github.com/ethereum/go-ethereum/p2p/enr" "github.com/ethereum/go-ethereum/p2p/enr"
ma "github.com/multiformats/go-multiaddr"
"github.com/status-im/status-go/whisper/v6" "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/db"
"github.com/status-im/status-go/discovery" "github.com/status-im/status-go/discovery"

View File

@ -17,13 +17,15 @@ import (
gethnode "github.com/ethereum/go-ethereum/node" gethnode "github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enode"
"github.com/status-im/status-go/whisper/v6" "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/discovery"
"github.com/status-im/status-go/params" "github.com/status-im/status-go/params"
"github.com/status-im/status-go/t/helpers" "github.com/status-im/status-go/t/helpers"
"github.com/status-im/status-go/t/utils" "github.com/status-im/status-go/t/utils"
"github.com/stretchr/testify/require"
) )
func TestStatusNodeStart(t *testing.T) { func TestStatusNodeStart(t *testing.T) {

View File

@ -11,14 +11,16 @@ import (
"strings" "strings"
"time" "time"
validator "gopkg.in/go-playground/validator.v9"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/p2p/discv5" "github.com/ethereum/go-ethereum/p2p/discv5"
"github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/params"
"github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/crypto"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/static" "github.com/status-im/status-go/static"
"github.com/status-im/status-go/whisper/v6" "github.com/status-im/status-go/whisper/v6"
validator "gopkg.in/go-playground/validator.v9"
) )
// ---------- // ----------

View File

@ -9,11 +9,13 @@ import (
validator "gopkg.in/go-playground/validator.v9" 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/assert"
"github.com/stretchr/testify/require" "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) { func TestNewNodeConfigWithDefaults(t *testing.T) {

View File

@ -1,12 +1,14 @@
package peers package peers
import ( import (
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/util"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/p2p/discv5" "github.com/ethereum/go-ethereum/p2p/discv5"
"github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enode"
"github.com/status-im/status-go/db" "github.com/status-im/status-go/db"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/util"
) )
// NewCache returns instance of PeersDatabase // NewCache returns instance of PeersDatabase

View File

@ -6,12 +6,13 @@ import (
"github.com/ethereum/go-ethereum/p2p/enode" "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/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/storage" "github.com/syndtr/goleveldb/leveldb/storage"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/p2p/discv5"
) )
func TestPeersRange(t *testing.T) { func TestPeersRange(t *testing.T) {

View File

@ -5,6 +5,7 @@ import (
"github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enode"
"github.com/status-im/status-go/params" "github.com/status-im/status-go/params"
"github.com/status-im/status-go/signal" "github.com/status-im/status-go/signal"
) )

View File

@ -5,13 +5,15 @@ import (
"testing" "testing"
"time" "time"
"github.com/stretchr/testify/suite"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/p2p/discv5" "github.com/ethereum/go-ethereum/p2p/discv5"
"github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enode"
"github.com/status-im/status-go/params" "github.com/status-im/status-go/params"
"github.com/stretchr/testify/suite"
) )
type CacheOnlyTopicPoolSuite struct { type CacheOnlyTopicPoolSuite struct {

View File

@ -8,11 +8,6 @@ import (
"testing" "testing"
"time" "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" lcrypto "github.com/libp2p/go-libp2p-core/crypto"
ma "github.com/multiformats/go-multiaddr" ma "github.com/multiformats/go-multiaddr"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
@ -21,7 +16,14 @@ import (
"github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/storage" "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/rendezvous/server"
"github.com/status-im/status-go/discovery" "github.com/status-im/status-go/discovery"
"github.com/status-im/status-go/params" "github.com/status-im/status-go/params"
"github.com/status-im/status-go/signal" "github.com/status-im/status-go/signal"

View File

@ -2,6 +2,7 @@ package peers
import ( import (
"github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p"
"github.com/status-im/status-go/signal" "github.com/status-im/status-go/signal"
) )

View File

@ -5,6 +5,7 @@ import (
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/p2p/discv5" "github.com/ethereum/go-ethereum/p2p/discv5"
"github.com/status-im/status-go/discovery" "github.com/status-im/status-go/discovery"
) )

View File

@ -11,6 +11,7 @@ import (
"github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/p2p/discv5" "github.com/ethereum/go-ethereum/p2p/discv5"
"github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enode"
"github.com/status-im/status-go/discovery" "github.com/status-im/status-go/discovery"
"github.com/status-im/status-go/params" "github.com/status-im/status-go/params"
) )

View File

@ -5,17 +5,19 @@ import (
"testing" "testing"
"time" "time"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/mclock" "github.com/ethereum/go-ethereum/common/mclock"
"github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/p2p/discv5" "github.com/ethereum/go-ethereum/p2p/discv5"
"github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enode"
"github.com/status-im/status-go/params" "github.com/status-im/status-go/params"
"github.com/status-im/status-go/t/helpers" "github.com/status-im/status-go/t/helpers"
"github.com/status-im/status-go/whisper/v6" "github.com/status-im/status-go/whisper/v6"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
) )
type TopicPoolSuite struct { type TopicPoolSuite struct {

View File

@ -4,8 +4,9 @@ import (
"context" "context"
"testing" "testing"
"github.com/ethereum/go-ethereum/p2p/enode"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/ethereum/go-ethereum/p2p/enode"
) )
func TestLocalVerifierForNodeIDTypes(t *testing.T) { func TestLocalVerifierForNodeIDTypes(t *testing.T) {

View File

@ -5,8 +5,9 @@ package applicationmetadata
import ( import (
fmt "fmt" fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math" math "math"
proto "github.com/golang/protobuf/proto"
) )
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.

View File

@ -2,6 +2,7 @@ package applicationmetadata
import ( import (
"crypto/ecdsa" "crypto/ecdsa"
"github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/crypto"
) )

View File

@ -4,11 +4,12 @@ import (
"crypto/ecdsa" "crypto/ecdsa"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
datasyncpeer "github.com/status-im/status-go/protocol/datasync/peer"
datasyncnode "github.com/vacp2p/mvds/node" datasyncnode "github.com/vacp2p/mvds/node"
datasyncproto "github.com/vacp2p/mvds/protobuf" datasyncproto "github.com/vacp2p/mvds/protobuf"
datasynctransport "github.com/vacp2p/mvds/transport" datasynctransport "github.com/vacp2p/mvds/transport"
"go.uber.org/zap" "go.uber.org/zap"
datasyncpeer "github.com/status-im/status-go/protocol/datasync/peer"
) )
type DataSync struct { type DataSync struct {

View File

@ -4,11 +4,13 @@ import (
"context" "context"
"crypto/ecdsa" "crypto/ecdsa"
"errors" "errors"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
datasyncpeer "github.com/status-im/status-go/protocol/datasync/peer"
"github.com/vacp2p/mvds/protobuf" "github.com/vacp2p/mvds/protobuf"
"github.com/vacp2p/mvds/state" "github.com/vacp2p/mvds/state"
"github.com/vacp2p/mvds/transport" "github.com/vacp2p/mvds/transport"
datasyncpeer "github.com/status-im/status-go/protocol/datasync/peer"
) )
var errNotInitialized = errors.New("Datasync transport not initialized") var errNotInitialized = errors.New("Datasync transport not initialized")

View File

@ -2,8 +2,10 @@ package datasync
import ( import (
"crypto/ecdsa" "crypto/ecdsa"
"github.com/status-im/status-go/eth-node/crypto"
"github.com/vacp2p/mvds/state" "github.com/vacp2p/mvds/state"
"github.com/status-im/status-go/eth-node/crypto"
) )
func ToGroupID(data []byte) state.GroupID { func ToGroupID(data []byte) state.GroupID {

View File

@ -10,10 +10,11 @@ import (
"github.com/status-im/status-go/protocol/sqlite" "github.com/status-im/status-go/protocol/sqlite"
"github.com/status-im/status-go/eth-node/crypto"
"github.com/stretchr/testify/suite" "github.com/stretchr/testify/suite"
"go.uber.org/zap" "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/multidevice"
"github.com/status-im/status-go/protocol/encryption/sharedsecret" "github.com/status-im/status-go/protocol/encryption/sharedsecret"
) )

View File

@ -14,10 +14,11 @@ import (
"github.com/status-im/status-go/protocol/sqlite" "github.com/status-im/status-go/protocol/sqlite"
"github.com/status-im/status-go/eth-node/crypto"
"github.com/stretchr/testify/suite" "github.com/stretchr/testify/suite"
"go.uber.org/zap" "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/multidevice"
"github.com/status-im/status-go/protocol/encryption/sharedsecret" "github.com/status-im/status-go/protocol/encryption/sharedsecret"
) )

View File

@ -9,9 +9,10 @@ import (
"time" "time"
dr "github.com/status-im/doubleratchet" 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"
"github.com/status-im/status-go/eth-node/crypto/ecies" "github.com/status-im/status-go/eth-node/crypto/ecies"
"go.uber.org/zap"
"github.com/status-im/status-go/protocol/encryption/multidevice" "github.com/status-im/status-go/protocol/encryption/multidevice"
) )

View File

@ -5,8 +5,9 @@ import (
"os" "os"
"testing" "testing"
"github.com/status-im/status-go/protocol/sqlite"
"github.com/stretchr/testify/suite" "github.com/stretchr/testify/suite"
"github.com/status-im/status-go/protocol/sqlite"
) )
const ( const (

View File

@ -6,6 +6,7 @@ import (
"strings" "strings"
dr "github.com/status-im/doubleratchet" dr "github.com/status-im/doubleratchet"
"github.com/status-im/status-go/eth-node/crypto" "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/multidevice"

View File

@ -6,9 +6,10 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/status-im/status-go/eth-node/crypto"
"github.com/stretchr/testify/suite" "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/encryption/multidevice"
"github.com/status-im/status-go/protocol/sqlite" "github.com/status-im/status-go/protocol/sqlite"
) )

View File

@ -5,8 +5,9 @@ package encryption
import ( import (
fmt "fmt" fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math" math "math"
proto "github.com/golang/protobuf/proto"
) )
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.

View File

@ -9,10 +9,11 @@ import (
"github.com/status-im/status-go/protocol/sqlite" "github.com/status-im/status-go/protocol/sqlite"
"github.com/status-im/status-go/eth-node/crypto"
"github.com/stretchr/testify/suite" "github.com/stretchr/testify/suite"
"go.uber.org/zap" "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/multidevice"
"github.com/status-im/status-go/protocol/encryption/sharedsecret" "github.com/status-im/status-go/protocol/encryption/sharedsecret"
) )

View File

@ -5,8 +5,9 @@ import (
"errors" "errors"
"time" "time"
"github.com/status-im/status-go/eth-node/crypto"
"go.uber.org/zap" "go.uber.org/zap"
"github.com/status-im/status-go/eth-node/crypto"
) )
const ( const (

View File

@ -7,10 +7,11 @@ import (
"github.com/status-im/status-go/protocol/tt" "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" "github.com/stretchr/testify/suite"
"go.uber.org/zap" "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) { func TestServiceTestSuite(t *testing.T) {

View File

@ -6,9 +6,10 @@ import (
"database/sql" "database/sql"
"errors" "errors"
"go.uber.org/zap"
"github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/crypto"
"github.com/status-im/status-go/eth-node/crypto/ecies" "github.com/status-im/status-go/eth-node/crypto/ecies"
"go.uber.org/zap"
) )
const sskLen = 16 const sskLen = 16

View File

@ -4,9 +4,10 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/stretchr/testify/require"
"github.com/status-im/status-go/eth-node/crypto" "github.com/status-im/status-go/eth-node/crypto"
"github.com/status-im/status-go/eth-node/crypto/ecies" "github.com/status-im/status-go/eth-node/crypto/ecies"
"github.com/stretchr/testify/require"
) )
const ( const (

Some files were not shown because too many files have changed in this diff Show More