diff --git a/.gometalinter.json b/.gometalinter.json index a6437d288..5664e4e0b 100644 --- a/.gometalinter.json +++ b/.gometalinter.json @@ -1,7 +1,7 @@ { "Exclude": [ ".*_mock.go", - "geth/jail/doc.go", + "jail/doc.go", ".*Errors unhandled.*fmt.Fprint.*gasv2.*" ], "Skip": ["helpers", "static"], diff --git a/Makefile b/Makefile index 2bf60a2a2..faf413698 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ CGO_CFLAGS=-I/$(JAVA_HOME)/include -I/$(JAVA_HOME)/include/darwin GOBIN=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))build/bin GIT_COMMIT := $(shell git rev-parse --short HEAD) -BUILD_FLAGS ?= $(shell echo "-ldflags '-X main.buildStamp=`date -u '+%Y-%m-%d.%H:%M:%S'` -X github.com/status-im/status-go/geth/params.VersionMeta=$(GIT_COMMIT)'") +BUILD_FLAGS ?= $(shell echo "-ldflags '-X main.buildStamp=`date -u '+%Y-%m-%d.%H:%M:%S'` -X github.com/status-im/status-go/params.VersionMeta=$(GIT_COMMIT)'") GO ?= latest XGOVERSION ?= 1.10.x @@ -130,10 +130,10 @@ mock-install: ##@other Install mocking tools go get -u github.com/golang/mock/mockgen mock: ##@other Regenerate mocks - mockgen -package=fcm -destination=geth/notifications/push/fcm/client_mock.go -source=geth/notifications/push/fcm/client.go - mockgen -package=fake -destination=geth/transactions/fake/mock.go -source=geth/transactions/fake/txservice.go - mockgen -package=account -destination=geth/account/accounts_mock.go -source=geth/account/accounts.go - mockgen -package=jail -destination=geth/jail/cell_mock.go -source=geth/jail/cell.go + mockgen -package=fcm -destination=notifications/push/fcm/client_mock.go -source=notifications/push/fcm/client.go + mockgen -package=fake -destination=transactions/fake/mock.go -source=transactions/fake/txservice.go + mockgen -package=account -destination=account/accounts_mock.go -source=account/accounts.go + mockgen -package=jail -destination=jail/cell_mock.go -source=jail/cell.go mockgen -package=status -destination=services/status/account_mock.go -source=services/status/service.go docker-test: ##@tests Run tests in a docker container with golang. diff --git a/README.md b/README.md index a01b590a6..a1f84a145 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ If you have problems running tests on public network we suggest reading [e2e gui If you want to launch specific test, for instance `RPCSendTransactions`, use the following command: ```shell -go test -v ./geth/api/ -testify.m ^RPCSendTransaction$ +go test -v ./api/ -testify.m ^RPCSendTransaction$ ``` Note `-testify.m` as [testify/suite](https://godoc.org/github.com/stretchr/testify/suite) is used to group individual tests. diff --git a/geth/account/accounts.go b/account/accounts.go similarity index 100% rename from geth/account/accounts.go rename to account/accounts.go diff --git a/geth/account/accounts_mock.go b/account/accounts_mock.go similarity index 98% rename from geth/account/accounts_mock.go rename to account/accounts_mock.go index 36c119214..f555a32f8 100644 --- a/geth/account/accounts_mock.go +++ b/account/accounts_mock.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: geth/account/accounts.go +// Source: account/accounts.go // Package account is a generated GoMock package. package account diff --git a/geth/account/accounts_test.go b/account/accounts_test.go similarity index 100% rename from geth/account/accounts_test.go rename to account/accounts_test.go diff --git a/geth/account/utils.go b/account/utils.go similarity index 100% rename from geth/account/utils.go rename to account/utils.go diff --git a/geth/account/utils_test.go b/account/utils_test.go similarity index 100% rename from geth/account/utils_test.go rename to account/utils_test.go diff --git a/geth/api/api.go b/api/api.go similarity index 96% rename from geth/api/api.go rename to api/api.go index 695b06e81..89e2aafbe 100644 --- a/geth/api/api.go +++ b/api/api.go @@ -7,12 +7,12 @@ import ( "github.com/ethereum/go-ethereum/accounts/keystore" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" - "github.com/status-im/status-go/geth/account" - "github.com/status-im/status-go/geth/jail" - "github.com/status-im/status-go/geth/node" - "github.com/status-im/status-go/geth/params" - "github.com/status-im/status-go/geth/transactions" + "github.com/status-im/status-go/account" + "github.com/status-im/status-go/jail" + "github.com/status-im/status-go/node" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/sign" + "github.com/status-im/status-go/transactions" ) // StatusAPI provides API to access Status related functionality. @@ -31,7 +31,7 @@ func NewStatusAPI() *StatusAPI { func NewStatusAPIWithBackend(b *StatusBackend) *StatusAPI { return &StatusAPI{ b: b, - log: log.New("package", "status-go/geth/api.StatusAPI"), + log: log.New("package", "status-go/api.StatusAPI"), } } diff --git a/geth/api/app_state.go b/api/app_state.go similarity index 100% rename from geth/api/app_state.go rename to api/app_state.go diff --git a/geth/api/app_state_test.go b/api/app_state_test.go similarity index 100% rename from geth/api/app_state_test.go rename to api/app_state_test.go diff --git a/geth/api/backend.go b/api/backend.go similarity index 96% rename from geth/api/backend.go rename to api/backend.go index b6a04d8fb..21a0937fb 100644 --- a/geth/api/backend.go +++ b/api/backend.go @@ -12,17 +12,17 @@ import ( fcmlib "github.com/NaySoftware/go-fcm" - "github.com/status-im/status-go/geth/account" - "github.com/status-im/status-go/geth/jail" - "github.com/status-im/status-go/geth/node" - "github.com/status-im/status-go/geth/notifications/push/fcm" - "github.com/status-im/status-go/geth/params" - "github.com/status-im/status-go/geth/rpc" - "github.com/status-im/status-go/geth/transactions" + "github.com/status-im/status-go/account" + "github.com/status-im/status-go/jail" + "github.com/status-im/status-go/node" + "github.com/status-im/status-go/notifications/push/fcm" + "github.com/status-im/status-go/params" + "github.com/status-im/status-go/rpc" "github.com/status-im/status-go/services/personal" "github.com/status-im/status-go/services/rpcfilters" "github.com/status-im/status-go/sign" "github.com/status-im/status-go/signal" + "github.com/status-im/status-go/transactions" ) const ( @@ -71,7 +71,7 @@ func NewStatusBackend() *StatusBackend { transactor: transactor, personalAPI: personalAPI, newNotification: notificationManager, - log: log.New("package", "status-go/geth/api.StatusBackend"), + log: log.New("package", "status-go/api.StatusBackend"), } } diff --git a/geth/api/backend_test.go b/api/backend_test.go similarity index 98% rename from geth/api/backend_test.go rename to api/backend_test.go index ad81bf7f8..d9e308766 100644 --- a/geth/api/backend_test.go +++ b/api/backend_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/status-im/status-go/geth/node" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/node" + "github.com/status-im/status-go/params" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/geth/api/connection.go b/api/connection.go similarity index 100% rename from geth/api/connection.go rename to api/connection.go diff --git a/geth/api/connection_test.go b/api/connection_test.go similarity index 100% rename from geth/api/connection_test.go rename to api/connection_test.go diff --git a/geth/api/txargs.go b/api/txargs.go similarity index 100% rename from geth/api/txargs.go rename to api/txargs.go diff --git a/geth/api/utils.go b/api/utils.go similarity index 100% rename from geth/api/utils.go rename to api/utils.go diff --git a/cmd/statusd/debug/commands.go b/cmd/statusd/debug/commands.go index d95cdb47a..3bf124791 100644 --- a/cmd/statusd/debug/commands.go +++ b/cmd/statusd/debug/commands.go @@ -9,8 +9,8 @@ import ( "strconv" "strings" - "github.com/status-im/status-go/geth/api" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/api" + "github.com/status-im/status-go/params" ) // command contains the result of a parsed command line and diff --git a/cmd/statusd/debug/debug.go b/cmd/statusd/debug/debug.go index 3129b2988..dabeb5ccf 100644 --- a/cmd/statusd/debug/debug.go +++ b/cmd/statusd/debug/debug.go @@ -7,7 +7,7 @@ import ( "reflect" "github.com/ethereum/go-ethereum/log" - "github.com/status-im/status-go/geth/api" + "github.com/status-im/status-go/api" ) const ( diff --git a/cmd/statusd/debug/debug_test.go b/cmd/statusd/debug/debug_test.go index 75abc41ae..0072fb63e 100644 --- a/cmd/statusd/debug/debug_test.go +++ b/cmd/statusd/debug/debug_test.go @@ -11,9 +11,9 @@ import ( "sync" "testing" + "github.com/status-im/status-go/api" "github.com/status-im/status-go/cmd/statusd/debug" - "github.com/status-im/status-go/geth/api" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/params" "github.com/stretchr/testify/assert" ) diff --git a/cmd/statusd/flags_test.go b/cmd/statusd/flags_test.go index e13fcea73..e29860aab 100644 --- a/cmd/statusd/flags_test.go +++ b/cmd/statusd/flags_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/params" "github.com/stretchr/testify/require" ) diff --git a/cmd/statusd/main.go b/cmd/statusd/main.go index 60182d460..ed5a5b7e6 100644 --- a/cmd/statusd/main.go +++ b/cmd/statusd/main.go @@ -15,12 +15,12 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p/discv5" + "github.com/status-im/status-go/api" "github.com/status-im/status-go/cmd/statusd/debug" "github.com/status-im/status-go/cmd/statusd/topics" - "github.com/status-im/status-go/geth/api" - "github.com/status-im/status-go/geth/node" - "github.com/status-im/status-go/geth/params" nodemetrics "github.com/status-im/status-go/metrics/node" + "github.com/status-im/status-go/node" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/profiling" ) diff --git a/cmd/statusd/sync.go b/cmd/statusd/sync.go index 9de3d9f5c..18658a3c8 100644 --- a/cmd/statusd/sync.go +++ b/cmd/statusd/sync.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/status-im/status-go/geth/node" + "github.com/status-im/status-go/node" ) func createContextFromTimeout(timeout int) (context.Context, context.CancelFunc) { diff --git a/cmd/statusd/topics/topics.go b/cmd/statusd/topics/topics.go index 02cc546bc..f2baa562e 100644 --- a/cmd/statusd/topics/topics.go +++ b/cmd/statusd/topics/topics.go @@ -6,7 +6,7 @@ import ( "strings" "github.com/ethereum/go-ethereum/p2p/discv5" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/params" ) // TopicFlag used to parse discv5 topics. diff --git a/cmd/statusd/topics/topics_test.go b/cmd/statusd/topics/topics_test.go index aaaef8643..f606adaf1 100644 --- a/cmd/statusd/topics/topics_test.go +++ b/cmd/statusd/topics/topics_test.go @@ -3,7 +3,7 @@ package topics import ( "testing" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/params" "github.com/stretchr/testify/assert" ) diff --git a/cmd/statusd/whispercfg.go b/cmd/statusd/whispercfg.go index 6bda6d0d2..3b16f9e69 100644 --- a/cmd/statusd/whispercfg.go +++ b/cmd/statusd/whispercfg.go @@ -6,7 +6,7 @@ import ( "fmt" "io/ioutil" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/params" ) // whisperConfig creates node configuration object from flags diff --git a/geth/db/db.go b/db/db.go similarity index 100% rename from geth/db/db.go rename to db/db.go diff --git a/geth/db/db_test.go b/db/db_test.go similarity index 100% rename from geth/db/db_test.go rename to db/db_test.go diff --git a/geth/jail/README.md b/jail/README.md similarity index 94% rename from geth/jail/README.md rename to jail/README.md index e83626fc6..476127539 100644 --- a/geth/jail/README.md +++ b/jail/README.md @@ -1,9 +1,9 @@ -# jail [![GoDoc](https://godoc.org/github.com/status-im/status-go/geth/jail?status.png)](https://godoc.org/github.com/status-im/status-go/geth/jail) +# jail [![GoDoc](https://godoc.org/github.com/status-im/status-go/jail?status.png)](https://godoc.org/github.com/status-im/status-go/jail) jail - jailed environment for executing JS code. Download: ```shell -go get github.com/status-im/status-go/geth/jail +go get github.com/status-im/status-go/jail ``` * * * @@ -47,7 +47,7 @@ wrappers around Otto VM functions of the same name. `Run` accepts raw JS strings Default Otto VM interpreter doesn't support setTimeout() / setInterval() JS functions, because they're not part of ECMA-262 spec, but properties of the window object in browser. -We add support for them using own implementation of Event Loop, heavily based on [ottoext package](https://github.com/deoxxa/ottoext). See loop/fetch/promise packages under [jail/internal/](https://github.com/status-im/status-go/tree/develop/geth/jail/internal). +We add support for them using own implementation of Event Loop, heavily based on [ottoext package](https://github.com/deoxxa/ottoext). See loop/fetch/promise packages under [jail/internal/](https://github.com/status-im/status-go/tree/develop/jail/internal). Each cell starts a new loop in a separate goroutine, registers functions for setTimeout / setInterval calls and associate them with this loop. All JS code executed as callback to setTimeout/setInterval will be handled by this loop. diff --git a/geth/jail/cell.go b/jail/cell.go similarity index 94% rename from geth/jail/cell.go rename to jail/cell.go index 608ed2ea6..d45021bc2 100644 --- a/geth/jail/cell.go +++ b/jail/cell.go @@ -6,11 +6,11 @@ import ( "time" "github.com/robertkrimen/otto" - "github.com/status-im/status-go/geth/jail/internal/fetch" - "github.com/status-im/status-go/geth/jail/internal/loop" - "github.com/status-im/status-go/geth/jail/internal/loop/looptask" - "github.com/status-im/status-go/geth/jail/internal/timers" - "github.com/status-im/status-go/geth/jail/internal/vm" + "github.com/status-im/status-go/jail/internal/fetch" + "github.com/status-im/status-go/jail/internal/loop" + "github.com/status-im/status-go/jail/internal/loop/looptask" + "github.com/status-im/status-go/jail/internal/timers" + "github.com/status-im/status-go/jail/internal/vm" ) const timeout = 5 * time.Second diff --git a/geth/jail/cell_mock.go b/jail/cell_mock.go similarity index 99% rename from geth/jail/cell_mock.go rename to jail/cell_mock.go index e047b5977..5c8bb8d9b 100644 --- a/geth/jail/cell_mock.go +++ b/jail/cell_mock.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: geth/jail/cell.go +// Source: jail/cell.go // Package jail is a generated GoMock package. package jail diff --git a/geth/jail/cell_test.go b/jail/cell_test.go similarity index 100% rename from geth/jail/cell_test.go rename to jail/cell_test.go diff --git a/geth/jail/console/console.go b/jail/console/console.go similarity index 100% rename from geth/jail/console/console.go rename to jail/console/console.go diff --git a/geth/jail/console/console_test.go b/jail/console/console_test.go similarity index 97% rename from geth/jail/console/console_test.go rename to jail/console/console_test.go index f8978a34d..00364b9a7 100644 --- a/geth/jail/console/console_test.go +++ b/jail/console/console_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/robertkrimen/otto" - "github.com/status-im/status-go/geth/jail/console" + "github.com/status-im/status-go/jail/console" "github.com/status-im/status-go/signal" "github.com/stretchr/testify/suite" ) diff --git a/geth/jail/doc.go b/jail/doc.go similarity index 96% rename from geth/jail/doc.go rename to jail/doc.go index 9a0ea75a6..77c45e79a 100644 --- a/geth/jail/doc.go +++ b/jail/doc.go @@ -1,5 +1,5 @@ /* -jail - jailed environment for executing JS code. +Package jail - jailed environment for executing JS code. Package jail implements "jailed" environment for executing arbitrary JavaScript code using Otto JS interpreter (https://github.com/robertkrimen/otto). @@ -37,7 +37,7 @@ wrappers around Otto VM functions of the same name. `Run` accepts raw JS strings Default Otto VM interpreter doesn't support setTimeout() / setInterval() JS functions, because they're not part of ECMA-262 spec, but properties of the window object in browser. -We add support for them using own implementation of Event Loop, heavily based on [ottoext package](https://github.com/deoxxa/ottoext). See loop/fetch/promise packages under [jail/internal/](https://github.com/status-im/status-go/tree/develop/geth/jail/internal). +We add support for them using own implementation of Event Loop, heavily based on [ottoext package](https://github.com/deoxxa/ottoext). See loop/fetch/promise packages under [jail/internal/](https://github.com/status-im/status-go/tree/develop/jail/internal). Each cell starts a new loop in a separate goroutine, registers functions for setTimeout / setInterval calls and associate them with this loop. All JS code executed as callback to setTimeout/setInterval will be handled by this loop. diff --git a/geth/jail/handlers.go b/jail/handlers.go similarity index 98% rename from geth/jail/handlers.go rename to jail/handlers.go index a15c15983..86b2e2c8c 100644 --- a/geth/jail/handlers.go +++ b/jail/handlers.go @@ -4,7 +4,7 @@ import ( "os" "github.com/robertkrimen/otto" - "github.com/status-im/status-go/geth/jail/console" + "github.com/status-im/status-go/jail/console" "github.com/status-im/status-go/signal" ) diff --git a/geth/jail/handlers_test.go b/jail/handlers_test.go similarity index 98% rename from geth/jail/handlers_test.go rename to jail/handlers_test.go index d29a9641e..9c39aff45 100644 --- a/geth/jail/handlers_test.go +++ b/jail/handlers_test.go @@ -12,8 +12,8 @@ import ( "sync/atomic" gethrpc "github.com/ethereum/go-ethereum/rpc" - "github.com/status-im/status-go/geth/params" - "github.com/status-im/status-go/geth/rpc" + "github.com/status-im/status-go/params" + "github.com/status-im/status-go/rpc" "github.com/status-im/status-go/signal" "github.com/stretchr/testify/suite" ) diff --git a/geth/jail/internal/LICENSE.md b/jail/internal/LICENSE.md similarity index 100% rename from geth/jail/internal/LICENSE.md rename to jail/internal/LICENSE.md diff --git a/geth/jail/internal/README.md b/jail/internal/README.md similarity index 78% rename from geth/jail/internal/README.md rename to jail/internal/README.md index cf80382cc..dd1b50dcb 100644 --- a/geth/jail/internal/README.md +++ b/jail/internal/README.md @@ -3,7 +3,7 @@ ottoext Originally based on [github.com/deoxxa/ottoext](https://github.com/deoxxa/ottoext) -[![GoDoc](https://godoc.org/github.com/status-im/status-go/geth/jail/ottoext?status.svg)](https://godoc.org/github.com/status-im/status-go/geth/jail/ottoext) +[![GoDoc](https://godoc.org/github.com/status-im/status-go/jail/ottoext?status.svg)](https://godoc.org/github.com/status-im/status-go/jail/ottoext) Overview -------- diff --git a/geth/jail/internal/fetch/Makefile b/jail/internal/fetch/Makefile similarity index 100% rename from geth/jail/internal/fetch/Makefile rename to jail/internal/fetch/Makefile diff --git a/geth/jail/internal/fetch/dist-fetch/bundle.js b/jail/internal/fetch/dist-fetch/bundle.js similarity index 100% rename from geth/jail/internal/fetch/dist-fetch/bundle.js rename to jail/internal/fetch/dist-fetch/bundle.js diff --git a/geth/jail/internal/fetch/dist-fetch/bundle.js.map b/jail/internal/fetch/dist-fetch/bundle.js.map similarity index 100% rename from geth/jail/internal/fetch/dist-fetch/bundle.js.map rename to jail/internal/fetch/dist-fetch/bundle.js.map diff --git a/geth/jail/internal/fetch/dist_fetch.go b/jail/internal/fetch/dist_fetch.go similarity index 100% rename from geth/jail/internal/fetch/dist_fetch.go rename to jail/internal/fetch/dist_fetch.go diff --git a/geth/jail/internal/fetch/fetch.go b/jail/internal/fetch/fetch.go similarity index 95% rename from geth/jail/internal/fetch/fetch.go rename to jail/internal/fetch/fetch.go index b3c82fb19..6f429c835 100644 --- a/geth/jail/internal/fetch/fetch.go +++ b/jail/internal/fetch/fetch.go @@ -11,9 +11,9 @@ import ( "github.com/robertkrimen/otto" - "github.com/status-im/status-go/geth/jail/internal/loop" - "github.com/status-im/status-go/geth/jail/internal/promise" - "github.com/status-im/status-go/geth/jail/internal/vm" + "github.com/status-im/status-go/jail/internal/loop" + "github.com/status-im/status-go/jail/internal/promise" + "github.com/status-im/status-go/jail/internal/vm" ) func mustValue(v otto.Value, err error) otto.Value { diff --git a/geth/jail/internal/fetch/fetch_test.go b/jail/internal/fetch/fetch_test.go similarity index 96% rename from geth/jail/internal/fetch/fetch_test.go rename to jail/internal/fetch/fetch_test.go index c93a3161b..351470146 100644 --- a/geth/jail/internal/fetch/fetch_test.go +++ b/jail/internal/fetch/fetch_test.go @@ -9,9 +9,9 @@ import ( "github.com/robertkrimen/otto" - "github.com/status-im/status-go/geth/jail/internal/fetch" - "github.com/status-im/status-go/geth/jail/internal/loop" - "github.com/status-im/status-go/geth/jail/internal/vm" + "github.com/status-im/status-go/jail/internal/fetch" + "github.com/status-im/status-go/jail/internal/loop" + "github.com/status-im/status-go/jail/internal/vm" "github.com/stretchr/testify/suite" ) diff --git a/geth/jail/internal/fetch/js/.gitignore b/jail/internal/fetch/js/.gitignore similarity index 100% rename from geth/jail/internal/fetch/js/.gitignore rename to jail/internal/fetch/js/.gitignore diff --git a/geth/jail/internal/fetch/js/bundle.js b/jail/internal/fetch/js/bundle.js similarity index 100% rename from geth/jail/internal/fetch/js/bundle.js rename to jail/internal/fetch/js/bundle.js diff --git a/geth/jail/internal/fetch/js/bundle.js.map b/jail/internal/fetch/js/bundle.js.map similarity index 100% rename from geth/jail/internal/fetch/js/bundle.js.map rename to jail/internal/fetch/js/bundle.js.map diff --git a/geth/jail/internal/fetch/js/fetch.js b/jail/internal/fetch/js/fetch.js similarity index 100% rename from geth/jail/internal/fetch/js/fetch.js rename to jail/internal/fetch/js/fetch.js diff --git a/geth/jail/internal/fetch/js/headers.js b/jail/internal/fetch/js/headers.js similarity index 100% rename from geth/jail/internal/fetch/js/headers.js rename to jail/internal/fetch/js/headers.js diff --git a/geth/jail/internal/fetch/js/index.js b/jail/internal/fetch/js/index.js similarity index 100% rename from geth/jail/internal/fetch/js/index.js rename to jail/internal/fetch/js/index.js diff --git a/geth/jail/internal/fetch/js/package.json b/jail/internal/fetch/js/package.json similarity index 100% rename from geth/jail/internal/fetch/js/package.json rename to jail/internal/fetch/js/package.json diff --git a/geth/jail/internal/fetch/js/request.js b/jail/internal/fetch/js/request.js similarity index 100% rename from geth/jail/internal/fetch/js/request.js rename to jail/internal/fetch/js/request.js diff --git a/geth/jail/internal/fetch/js/response.js b/jail/internal/fetch/js/response.js similarity index 100% rename from geth/jail/internal/fetch/js/response.js rename to jail/internal/fetch/js/response.js diff --git a/geth/jail/internal/fetch/js/webpack.config.js b/jail/internal/fetch/js/webpack.config.js similarity index 100% rename from geth/jail/internal/fetch/js/webpack.config.js rename to jail/internal/fetch/js/webpack.config.js diff --git a/geth/jail/internal/loop/loop.go b/jail/internal/loop/loop.go similarity index 98% rename from geth/jail/internal/loop/loop.go rename to jail/internal/loop/loop.go index e0523c9d4..f78ca4fb7 100644 --- a/geth/jail/internal/loop/loop.go +++ b/jail/internal/loop/loop.go @@ -6,7 +6,7 @@ import ( "sync" "sync/atomic" - "github.com/status-im/status-go/geth/jail/internal/vm" + "github.com/status-im/status-go/jail/internal/vm" ) // ErrClosed represents the error returned when we try to add or ready diff --git a/geth/jail/internal/loop/loop_test.go b/jail/internal/loop/loop_test.go similarity index 97% rename from geth/jail/internal/loop/loop_test.go rename to jail/internal/loop/loop_test.go index 0fb90e8f0..bc165c753 100644 --- a/geth/jail/internal/loop/loop_test.go +++ b/jail/internal/loop/loop_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/status-im/status-go/geth/jail/internal/vm" + "github.com/status-im/status-go/jail/internal/vm" "github.com/stretchr/testify/suite" ) diff --git a/geth/jail/internal/loop/looptask/tasks.go b/jail/internal/loop/looptask/tasks.go similarity index 96% rename from geth/jail/internal/loop/looptask/tasks.go rename to jail/internal/loop/looptask/tasks.go index fcaa9d5d1..e2e6b6e6b 100644 --- a/geth/jail/internal/loop/looptask/tasks.go +++ b/jail/internal/loop/looptask/tasks.go @@ -4,8 +4,8 @@ import ( "errors" "github.com/robertkrimen/otto" - "github.com/status-im/status-go/geth/jail/internal/loop" - "github.com/status-im/status-go/geth/jail/internal/vm" + "github.com/status-im/status-go/jail/internal/loop" + "github.com/status-im/status-go/jail/internal/vm" ) // IdleTask is designed to sit in a loop and keep it active, without doing any diff --git a/geth/jail/internal/main.go b/jail/internal/main.go similarity index 100% rename from geth/jail/internal/main.go rename to jail/internal/main.go diff --git a/geth/jail/internal/process/process.go b/jail/internal/process/process.go similarity index 100% rename from geth/jail/internal/process/process.go rename to jail/internal/process/process.go diff --git a/geth/jail/internal/promise/Makefile b/jail/internal/promise/Makefile similarity index 100% rename from geth/jail/internal/promise/Makefile rename to jail/internal/promise/Makefile diff --git a/geth/jail/internal/promise/dist-promise/bundle.js b/jail/internal/promise/dist-promise/bundle.js similarity index 100% rename from geth/jail/internal/promise/dist-promise/bundle.js rename to jail/internal/promise/dist-promise/bundle.js diff --git a/geth/jail/internal/promise/js.go b/jail/internal/promise/js.go similarity index 100% rename from geth/jail/internal/promise/js.go rename to jail/internal/promise/js.go diff --git a/geth/jail/internal/promise/promise.go b/jail/internal/promise/promise.go similarity index 70% rename from geth/jail/internal/promise/promise.go rename to jail/internal/promise/promise.go index 70daddb78..5fd07777e 100644 --- a/geth/jail/internal/promise/promise.go +++ b/jail/internal/promise/promise.go @@ -1,9 +1,9 @@ package promise import ( - "github.com/status-im/status-go/geth/jail/internal/loop" - "github.com/status-im/status-go/geth/jail/internal/timers" - "github.com/status-im/status-go/geth/jail/internal/vm" + "github.com/status-im/status-go/jail/internal/loop" + "github.com/status-im/status-go/jail/internal/timers" + "github.com/status-im/status-go/jail/internal/vm" ) //Define jail promise diff --git a/geth/jail/internal/promise/promise_test.go b/jail/internal/promise/promise_test.go similarity index 89% rename from geth/jail/internal/promise/promise_test.go rename to jail/internal/promise/promise_test.go index 2c5929f8b..30a358232 100644 --- a/geth/jail/internal/promise/promise_test.go +++ b/jail/internal/promise/promise_test.go @@ -7,9 +7,9 @@ import ( "github.com/stretchr/testify/suite" - "github.com/status-im/status-go/geth/jail/internal/loop" - "github.com/status-im/status-go/geth/jail/internal/promise" - "github.com/status-im/status-go/geth/jail/internal/vm" + "github.com/status-im/status-go/jail/internal/loop" + "github.com/status-im/status-go/jail/internal/promise" + "github.com/status-im/status-go/jail/internal/vm" ) func (s *PromiseSuite) TestResolve() { diff --git a/geth/jail/internal/timers/task.go b/jail/internal/timers/task.go similarity index 89% rename from geth/jail/internal/timers/task.go rename to jail/internal/timers/task.go index 7de3b3528..bb3703e50 100644 --- a/geth/jail/internal/timers/task.go +++ b/jail/internal/timers/task.go @@ -4,8 +4,8 @@ import ( "time" "github.com/robertkrimen/otto" - "github.com/status-im/status-go/geth/jail/internal/loop" - "github.com/status-im/status-go/geth/jail/internal/vm" + "github.com/status-im/status-go/jail/internal/loop" + "github.com/status-im/status-go/jail/internal/vm" ) type timerTask struct { diff --git a/geth/jail/internal/timers/timers.go b/jail/internal/timers/timers.go similarity index 95% rename from geth/jail/internal/timers/timers.go rename to jail/internal/timers/timers.go index 053d4e6ab..23b47e32c 100644 --- a/geth/jail/internal/timers/timers.go +++ b/jail/internal/timers/timers.go @@ -5,8 +5,8 @@ import ( "github.com/robertkrimen/otto" - "github.com/status-im/status-go/geth/jail/internal/loop" - "github.com/status-im/status-go/geth/jail/internal/vm" + "github.com/status-im/status-go/jail/internal/loop" + "github.com/status-im/status-go/jail/internal/vm" ) // Define jail timers diff --git a/geth/jail/internal/timers/timers_test.go b/jail/internal/timers/timers_test.go similarity index 93% rename from geth/jail/internal/timers/timers_test.go rename to jail/internal/timers/timers_test.go index 85378ede3..a8763ba34 100644 --- a/geth/jail/internal/timers/timers_test.go +++ b/jail/internal/timers/timers_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/status-im/status-go/geth/jail/internal/loop" - "github.com/status-im/status-go/geth/jail/internal/timers" - "github.com/status-im/status-go/geth/jail/internal/vm" + "github.com/status-im/status-go/jail/internal/loop" + "github.com/status-im/status-go/jail/internal/timers" + "github.com/status-im/status-go/jail/internal/vm" "github.com/stretchr/testify/suite" ) diff --git a/geth/jail/internal/vm/vm.go b/jail/internal/vm/vm.go similarity index 100% rename from geth/jail/internal/vm/vm.go rename to jail/internal/vm/vm.go diff --git a/geth/jail/jail.go b/jail/jail.go similarity index 99% rename from geth/jail/jail.go rename to jail/jail.go index 253a35ebd..fd08fd53f 100644 --- a/geth/jail/jail.go +++ b/jail/jail.go @@ -9,7 +9,7 @@ import ( "github.com/robertkrimen/otto" web3js "github.com/status-im/go-web3js" - "github.com/status-im/status-go/geth/rpc" + "github.com/status-im/status-go/rpc" ) const ( diff --git a/geth/jail/jail_test.go b/jail/jail_test.go similarity index 99% rename from geth/jail/jail_test.go rename to jail/jail_test.go index d49ccf273..d513b5b32 100644 --- a/geth/jail/jail_test.go +++ b/jail/jail_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/robertkrimen/otto" - "github.com/status-im/status-go/geth/rpc" + "github.com/status-im/status-go/rpc" "github.com/stretchr/testify/suite" ) diff --git a/lib/library.go b/lib/library.go index 58183c4dd..f71990002 100644 --- a/lib/library.go +++ b/lib/library.go @@ -8,8 +8,8 @@ import ( "github.com/NaySoftware/go-fcm" "github.com/ethereum/go-ethereum/log" - "github.com/status-im/status-go/geth/params" "github.com/status-im/status-go/logutils" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/profiling" "github.com/status-im/status-go/sign" "gopkg.in/go-playground/validator.v9" diff --git a/lib/library_test_utils.go b/lib/library_test_utils.go index 3f36515db..7d631360d 100644 --- a/lib/library_test_utils.go +++ b/lib/library_test_utils.go @@ -31,13 +31,13 @@ import ( gethparams "github.com/ethereum/go-ethereum/params" "github.com/stretchr/testify/require" - "github.com/status-im/status-go/geth/account" - "github.com/status-im/status-go/geth/params" - "github.com/status-im/status-go/geth/transactions" + "github.com/status-im/status-go/account" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/sign" "github.com/status-im/status-go/signal" "github.com/status-im/status-go/static" . "github.com/status-im/status-go/t/utils" //nolint: golint + "github.com/status-im/status-go/transactions" ) const initJS = ` diff --git a/lib/main.go b/lib/main.go index 4be657635..e3c8ba739 100644 --- a/lib/main.go +++ b/lib/main.go @@ -1,6 +1,6 @@ package main -import "github.com/status-im/status-go/geth/api" +import "github.com/status-im/status-go/api" var statusAPI = api.NewStatusAPI() diff --git a/mailserver/mailserver.go b/mailserver/mailserver.go index 1f712fec6..0cc3ec725 100644 --- a/mailserver/mailserver.go +++ b/mailserver/mailserver.go @@ -29,7 +29,7 @@ import ( "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/rlp" whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/params" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/util" ) diff --git a/mailserver/mailserver_test.go b/mailserver/mailserver_test.go index e4401ec9f..76ccbf841 100644 --- a/mailserver/mailserver_test.go +++ b/mailserver/mailserver_test.go @@ -29,7 +29,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/rlp" whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/params" "github.com/stretchr/testify/suite" ) diff --git a/geth/node/node.go b/node/node.go similarity index 98% rename from geth/node/node.go rename to node/node.go index 4211f2a0f..07c9b4888 100644 --- a/geth/node/node.go +++ b/node/node.go @@ -20,9 +20,9 @@ import ( "github.com/ethereum/go-ethereum/p2p/discv5" "github.com/ethereum/go-ethereum/p2p/nat" whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" - "github.com/status-im/status-go/geth/params" "github.com/status-im/status-go/mailserver" shhmetrics "github.com/status-im/status-go/metrics/whisper" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/services/personal" "github.com/status-im/status-go/services/shhext" "github.com/status-im/status-go/services/status" @@ -40,7 +40,7 @@ var ( ) // All general log messages in this package should be routed through this logger. -var logger = log.New("package", "status-go/geth/node") +var logger = log.New("package", "status-go/node") // MakeNode create a geth node entity func MakeNode(config *params.NodeConfig, db *leveldb.DB) (*node.Node, error) { diff --git a/geth/node/node_api_test.go b/node/node_api_test.go similarity index 96% rename from geth/node/node_api_test.go rename to node/node_api_test.go index 51e489add..cffebe779 100644 --- a/geth/node/node_api_test.go +++ b/node/node_api_test.go @@ -5,7 +5,7 @@ import ( whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/params" "github.com/stretchr/testify/require" ) diff --git a/geth/node/node_test.go b/node/node_test.go similarity index 100% rename from geth/node/node_test.go rename to node/node_test.go diff --git a/geth/node/status_node.go b/node/status_node.go similarity index 98% rename from geth/node/status_node.go rename to node/status_node.go index 587c1449c..a2e5639db 100644 --- a/geth/node/status_node.go +++ b/node/status_node.go @@ -18,10 +18,10 @@ import ( whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" "github.com/syndtr/goleveldb/leveldb" - "github.com/status-im/status-go/geth/db" - "github.com/status-im/status-go/geth/params" - "github.com/status-im/status-go/geth/peers" - "github.com/status-im/status-go/geth/rpc" + "github.com/status-im/status-go/db" + "github.com/status-im/status-go/params" + "github.com/status-im/status-go/peers" + "github.com/status-im/status-go/rpc" "github.com/status-im/status-go/services/status" ) @@ -57,7 +57,7 @@ type StatusNode struct { // New makes new instance of StatusNode. func New() *StatusNode { return &StatusNode{ - log: log.New("package", "status-go/geth/node.StatusNode"), + log: log.New("package", "status-go/node.StatusNode"), } } diff --git a/geth/node/status_node_rpc_client_test.go b/node/status_node_rpc_client_test.go similarity index 96% rename from geth/node/status_node_rpc_client_test.go rename to node/status_node_rpc_client_test.go index 17d207f03..a7aa81bdf 100644 --- a/geth/node/status_node_rpc_client_test.go +++ b/node/status_node_rpc_client_test.go @@ -10,8 +10,8 @@ import ( "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/rpc" - "github.com/status-im/status-go/geth/node" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/node" + "github.com/status-im/status-go/params" ) type TestServiceAPI struct{} diff --git a/geth/node/status_node_test.go b/node/status_node_test.go similarity index 99% rename from geth/node/status_node_test.go rename to node/status_node_test.go index ae31a269e..981001a6e 100644 --- a/geth/node/status_node_test.go +++ b/node/status_node_test.go @@ -16,7 +16,7 @@ import ( "github.com/ethereum/go-ethereum/p2p/discover" whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/params" "github.com/stretchr/testify/require" ) diff --git a/geth/notifications/push/fcm/client.go b/notifications/push/fcm/client.go similarity index 100% rename from geth/notifications/push/fcm/client.go rename to notifications/push/fcm/client.go diff --git a/geth/notifications/push/fcm/client_mock.go b/notifications/push/fcm/client_mock.go similarity index 98% rename from geth/notifications/push/fcm/client_mock.go rename to notifications/push/fcm/client_mock.go index a10bf1662..71dc2c293 100644 --- a/geth/notifications/push/fcm/client_mock.go +++ b/notifications/push/fcm/client_mock.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: geth/notifications/push/fcm/client.go +// Source: notifications/push/fcm/client.go // Package fcm is a generated GoMock package. package fcm diff --git a/geth/notifications/push/fcm/notification.go b/notifications/push/fcm/notification.go similarity index 100% rename from geth/notifications/push/fcm/notification.go rename to notifications/push/fcm/notification.go diff --git a/geth/notifications/push/fcm/notification_test.go b/notifications/push/fcm/notification_test.go similarity index 100% rename from geth/notifications/push/fcm/notification_test.go rename to notifications/push/fcm/notification_test.go diff --git a/geth/notifications/push/payload.go b/notifications/push/payload.go similarity index 100% rename from geth/notifications/push/payload.go rename to notifications/push/payload.go diff --git a/geth/params/cluster.go b/params/cluster.go similarity index 100% rename from geth/params/cluster.go rename to params/cluster.go diff --git a/geth/params/config.go b/params/config.go similarity index 99% rename from geth/params/config.go rename to params/config.go index 5464ecea9..f00ca24c6 100644 --- a/geth/params/config.go +++ b/params/config.go @@ -332,7 +332,7 @@ func NewNodeConfig(dataDir string, clstrCfgFile string, networkID uint64) (*Node MaxPeers: MaxPeers, MaxPendingPeers: MaxPendingPeers, IPCFile: IPCFile, - log: log.New("package", "status-go/geth/params.NodeConfig"), + log: log.New("package", "status-go/params.NodeConfig"), LogFile: LogFile, LogLevel: LogLevel, LogToStderr: LogToStderr, diff --git a/geth/params/config_test.go b/params/config_test.go similarity index 99% rename from geth/params/config_test.go rename to params/config_test.go index 656507181..76d70c808 100644 --- a/geth/params/config_test.go +++ b/params/config_test.go @@ -13,7 +13,7 @@ import ( "github.com/ethereum/go-ethereum/core" gethparams "github.com/ethereum/go-ethereum/params" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/params" "github.com/stretchr/testify/require" ) diff --git a/geth/params/defaults.go b/params/defaults.go similarity index 100% rename from geth/params/defaults.go rename to params/defaults.go diff --git a/geth/params/validator.go b/params/validator.go similarity index 100% rename from geth/params/validator.go rename to params/validator.go diff --git a/geth/params/version.go b/params/version.go similarity index 92% rename from geth/params/version.go rename to params/version.go index 0d0dab76a..5867402c6 100644 --- a/geth/params/version.go +++ b/params/version.go @@ -16,7 +16,7 @@ const ( ) // VersionMeta is metadata to append to the version string -var VersionMeta string // rely on linker: -ldflags -X github.com/status-im/status-go/geth/params.VersionMeta" +var VersionMeta string // rely on linker: -ldflags -X github.com/status-im/status-go/params.VersionMeta" // Version exposes string representation of program version. var Version = fmt.Sprintf("%d.%d.%d-%s", VersionMajor, VersionMinor, VersionPatch, VersionMeta) diff --git a/geth/peers/README.md b/peers/README.md similarity index 100% rename from geth/peers/README.md rename to peers/README.md diff --git a/geth/peers/cache.go b/peers/cache.go similarity index 97% rename from geth/peers/cache.go rename to peers/cache.go index 7362f7704..a0beb677f 100644 --- a/geth/peers/cache.go +++ b/peers/cache.go @@ -3,7 +3,7 @@ package peers import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p/discv5" - "github.com/status-im/status-go/geth/db" + "github.com/status-im/status-go/db" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/util" ) diff --git a/geth/peers/cache_test.go b/peers/cache_test.go similarity index 100% rename from geth/peers/cache_test.go rename to peers/cache_test.go diff --git a/geth/peers/discv5.go b/peers/discv5.go similarity index 100% rename from geth/peers/discv5.go rename to peers/discv5.go diff --git a/geth/peers/peerpool.go b/peers/peerpool.go similarity index 99% rename from geth/peers/peerpool.go rename to peers/peerpool.go index 1ef9e551a..cdfa9c50d 100644 --- a/geth/peers/peerpool.go +++ b/peers/peerpool.go @@ -12,7 +12,7 @@ import ( "github.com/ethereum/go-ethereum/p2p/discover" "github.com/ethereum/go-ethereum/p2p/discv5" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/signal" ) diff --git a/geth/peers/peerpool_test.go b/peers/peerpool_test.go similarity index 99% rename from geth/peers/peerpool_test.go rename to peers/peerpool_test.go index ad8a154d7..55fd7e7ee 100644 --- a/geth/peers/peerpool_test.go +++ b/peers/peerpool_test.go @@ -17,7 +17,7 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/signal" // to access logs in the test with `-log` flag diff --git a/geth/peers/signal.go b/peers/signal.go similarity index 100% rename from geth/peers/signal.go rename to peers/signal.go diff --git a/geth/peers/topic_peer_queue.go b/peers/topic_peer_queue.go similarity index 100% rename from geth/peers/topic_peer_queue.go rename to peers/topic_peer_queue.go diff --git a/geth/peers/topic_peer_queue_test.go b/peers/topic_peer_queue_test.go similarity index 100% rename from geth/peers/topic_peer_queue_test.go rename to peers/topic_peer_queue_test.go diff --git a/geth/peers/topic_register.go b/peers/topic_register.go similarity index 100% rename from geth/peers/topic_register.go rename to peers/topic_register.go diff --git a/geth/peers/topicpool.go b/peers/topicpool.go similarity index 99% rename from geth/peers/topicpool.go rename to peers/topicpool.go index 430ef3fe1..b567d29f8 100644 --- a/geth/peers/topicpool.go +++ b/peers/topicpool.go @@ -11,7 +11,7 @@ import ( "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/discover" "github.com/ethereum/go-ethereum/p2p/discv5" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/params" ) const ( diff --git a/geth/peers/topicpool_test.go b/peers/topicpool_test.go similarity index 99% rename from geth/peers/topicpool_test.go rename to peers/topicpool_test.go index eee0679a5..bab62f4c9 100644 --- a/geth/peers/topicpool_test.go +++ b/peers/topicpool_test.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/discover" "github.com/ethereum/go-ethereum/p2p/discv5" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/params" "github.com/stretchr/testify/suite" ) diff --git a/geth/rpc/README.md b/rpc/README.md similarity index 88% rename from geth/rpc/README.md rename to rpc/README.md index 4ffc95cc1..e6144474a 100644 --- a/geth/rpc/README.md +++ b/rpc/README.md @@ -1,9 +1,9 @@ -# rpc [![GoDoc](https://godoc.org/github.com/status-im/status-go/geth/rpc?status.png)](https://godoc.org/github.com/status-im/status-go/geth/rpc) +# rpc [![GoDoc](https://godoc.org/github.com/status-im/status-go/rpc?status.png)](https://godoc.org/github.com/status-im/status-go/rpc) Package rpc - JSON-RPC client with custom routing. Download: ```shell -go get github.com/status-im/status-go/geth/rpc +go get github.com/status-im/status-go/rpc ``` * * * diff --git a/geth/rpc/call_raw.go b/rpc/call_raw.go similarity index 100% rename from geth/rpc/call_raw.go rename to rpc/call_raw.go diff --git a/geth/rpc/call_raw_test.go b/rpc/call_raw_test.go similarity index 100% rename from geth/rpc/call_raw_test.go rename to rpc/call_raw_test.go diff --git a/geth/rpc/client.go b/rpc/client.go similarity index 98% rename from geth/rpc/client.go rename to rpc/client.go index 34435cdf6..bf7a3159d 100644 --- a/geth/rpc/client.go +++ b/rpc/client.go @@ -10,7 +10,7 @@ import ( "time" "github.com/ethereum/go-ethereum/log" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/params" gethrpc "github.com/ethereum/go-ethereum/rpc" ) @@ -49,7 +49,7 @@ func NewClient(client *gethrpc.Client, upstream params.UpstreamRPCConfig) (*Clie c := Client{ local: client, handlers: make(map[string]Handler), - log: log.New("package", "status-go/geth/rpc.Client"), + log: log.New("package", "status-go/rpc.Client"), } var err error diff --git a/geth/rpc/doc.go b/rpc/doc.go similarity index 100% rename from geth/rpc/doc.go rename to rpc/doc.go diff --git a/geth/rpc/route.go b/rpc/route.go similarity index 100% rename from geth/rpc/route.go rename to rpc/route.go diff --git a/geth/rpc/route_test.go b/rpc/route_test.go similarity index 100% rename from geth/rpc/route_test.go rename to rpc/route_test.go diff --git a/services/personal/api.go b/services/personal/api.go index df897409b..2c74d9e8b 100644 --- a/services/personal/api.go +++ b/services/personal/api.go @@ -6,9 +6,9 @@ import ( "strings" "time" - "github.com/status-im/status-go/geth/account" - "github.com/status-im/status-go/geth/params" - "github.com/status-im/status-go/geth/rpc" + "github.com/status-im/status-go/account" + "github.com/status-im/status-go/params" + "github.com/status-im/status-go/rpc" "github.com/status-im/status-go/sign" ) diff --git a/services/rpcfilters/latest_block_provider.go b/services/rpcfilters/latest_block_provider.go index bf7fe278d..c2e9a1722 100644 --- a/services/rpcfilters/latest_block_provider.go +++ b/services/rpcfilters/latest_block_provider.go @@ -6,7 +6,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/status-im/status-go/geth/rpc" + "github.com/status-im/status-go/rpc" ) type rpcProvider interface { diff --git a/services/shhext/dedup/cache.go b/services/shhext/dedup/cache.go index 72df8aa9a..41d21ce2a 100644 --- a/services/shhext/dedup/cache.go +++ b/services/shhext/dedup/cache.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/crypto/sha3" whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" - "github.com/status-im/status-go/geth/db" + "github.com/status-im/status-go/db" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/util" ) diff --git a/sign/errors.go b/sign/errors.go index 77992cb36..6040b8c20 100644 --- a/sign/errors.go +++ b/sign/errors.go @@ -4,7 +4,7 @@ import ( "errors" "github.com/ethereum/go-ethereum/accounts/keystore" - "github.com/status-im/status-go/geth/account" + "github.com/status-im/status-go/account" ) var ( diff --git a/sign/pending_requests.go b/sign/pending_requests.go index 8fd20c0c1..2387155b5 100644 --- a/sign/pending_requests.go +++ b/sign/pending_requests.go @@ -6,7 +6,7 @@ import ( "time" "github.com/ethereum/go-ethereum/log" - "github.com/status-im/status-go/geth/account" + "github.com/status-im/status-go/account" ) type verifyFunc func(string) (*account.SelectedExtKey, error) diff --git a/sign/pending_requests_test.go b/sign/pending_requests_test.go index bdeef7252..96094deab 100644 --- a/sign/pending_requests_test.go +++ b/sign/pending_requests_test.go @@ -12,7 +12,7 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/status-im/status-go/geth/account" + "github.com/status-im/status-go/account" "github.com/stretchr/testify/suite" ) diff --git a/sign/request.go b/sign/request.go index 68afd1d92..a12425269 100644 --- a/sign/request.go +++ b/sign/request.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/pborman/uuid" - "github.com/status-im/status-go/geth/account" + "github.com/status-im/status-go/account" ) // CompleteFunc is a function that is called after the sign request is approved. diff --git a/t/destructive/peers_test.go b/t/destructive/peers_test.go index 5c1087198..ab260be39 100644 --- a/t/destructive/peers_test.go +++ b/t/destructive/peers_test.go @@ -8,7 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/whisper/whisperv6" - "github.com/status-im/status-go/geth/api" + "github.com/status-im/status-go/api" . "github.com/status-im/status-go/t/utils" "github.com/ethereum/go-ethereum/p2p" diff --git a/t/destructive/sync_test.go b/t/destructive/sync_test.go index 61d9b9553..c8e32cb52 100644 --- a/t/destructive/sync_test.go +++ b/t/destructive/sync_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/suite" "github.com/ethereum/go-ethereum/log" - "github.com/status-im/status-go/geth/api" + "github.com/status-im/status-go/api" . "github.com/status-im/status-go/t/utils" ) diff --git a/t/e2e/accounts/accounts_rpc_test.go b/t/e2e/accounts/accounts_rpc_test.go index 78398f083..57785e1f8 100644 --- a/t/e2e/accounts/accounts_rpc_test.go +++ b/t/e2e/accounts/accounts_rpc_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - "github.com/status-im/status-go/geth/params" + "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" diff --git a/t/e2e/accounts/accounts_test.go b/t/e2e/accounts/accounts_test.go index e6ca7fda3..7c310a24a 100644 --- a/t/e2e/accounts/accounts_test.go +++ b/t/e2e/accounts/accounts_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/status-im/status-go/geth/account" + "github.com/status-im/status-go/account" e2e "github.com/status-im/status-go/t/e2e" . "github.com/status-im/status-go/t/utils" "github.com/stretchr/testify/suite" diff --git a/t/e2e/api/api_test.go b/t/e2e/api/api_test.go index da1d5ad09..285293f3c 100644 --- a/t/e2e/api/api_test.go +++ b/t/e2e/api/api_test.go @@ -10,9 +10,9 @@ import ( "time" "github.com/ethereum/go-ethereum/log" - "github.com/status-im/status-go/geth/api" - "github.com/status-im/status-go/geth/node" - "github.com/status-im/status-go/geth/params" + "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" diff --git a/t/e2e/api/backend_test.go b/t/e2e/api/backend_test.go index 0ce99ef86..add311676 100644 --- a/t/e2e/api/backend_test.go +++ b/t/e2e/api/backend_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/status-im/status-go/geth/params" + "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" @@ -19,7 +19,7 @@ type APIBackendTestSuite struct { e2e.BackendTestSuite } -// FIXME(tiabc): There's also a test with the same name in geth/node/manager_test.go +// FIXME(tiabc): There's also a test with the same name in node/manager_test.go // so this test should only check StatusBackend logic with a mocked version of the underlying StatusNode. func (s *APIBackendTestSuite) TestNetworkSwitching() { // Get test node configuration. @@ -78,7 +78,7 @@ func (s *APIBackendTestSuite) TestResetChainData() { s.Equal(GetHeadHash(), firstHash) } -// FIXME(tiabc): There's also a test with the same name in geth/node/manager_test.go +// FIXME(tiabc): There's also a test with the same name in node/manager_test.go // so this test should only check StatusBackend logic with a mocked version of the underlying StatusNode. func (s *APIBackendTestSuite) TestRestartNode() { require := s.Require() diff --git a/t/e2e/jail/jail_rpc_test.go b/t/e2e/jail/jail_rpc_test.go index 4e94c8e42..5be2da710 100644 --- a/t/e2e/jail/jail_rpc_test.go +++ b/t/e2e/jail/jail_rpc_test.go @@ -13,8 +13,8 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/status-im/status-go/geth/jail" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/jail" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/signal" e2e "github.com/status-im/status-go/t/e2e" . "github.com/status-im/status-go/t/utils" diff --git a/t/e2e/jail/jail_test.go b/t/e2e/jail/jail_test.go index 3dbfe05f6..014cc3004 100644 --- a/t/e2e/jail/jail_test.go +++ b/t/e2e/jail/jail_test.go @@ -10,8 +10,8 @@ import ( "testing" "time" - "github.com/status-im/status-go/geth/jail" - "github.com/status-im/status-go/geth/node" + "github.com/status-im/status-go/jail" + "github.com/status-im/status-go/node" "github.com/status-im/status-go/signal" "github.com/status-im/status-go/static" "github.com/status-im/status-go/t/e2e" diff --git a/t/e2e/node/manager_test.go b/t/e2e/node/manager_test.go index 47b2b1380..ca44610a2 100644 --- a/t/e2e/node/manager_test.go +++ b/t/e2e/node/manager_test.go @@ -10,8 +10,8 @@ import ( gethnode "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/rpc" whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" - "github.com/status-im/status-go/geth/node" - "github.com/status-im/status-go/geth/params" + "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" diff --git a/t/e2e/rpc/client_test.go b/t/e2e/rpc/client_test.go index 4c0da864d..3ba41ec8d 100644 --- a/t/e2e/rpc/client_test.go +++ b/t/e2e/rpc/client_test.go @@ -3,8 +3,8 @@ package rpc import ( "testing" - "github.com/status-im/status-go/geth/node" - "github.com/status-im/status-go/geth/rpc" + "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" diff --git a/t/e2e/rpc/rpc_test.go b/t/e2e/rpc/rpc_test.go index 908ab313e..2cce7c4e3 100644 --- a/t/e2e/rpc/rpc_test.go +++ b/t/e2e/rpc/rpc_test.go @@ -10,8 +10,8 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/status-im/status-go/geth/node" - "github.com/status-im/status-go/geth/params" + "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" diff --git a/t/e2e/services/base_api_test.go b/t/e2e/services/base_api_test.go index cb4d759bc..91d7c8ef9 100644 --- a/t/e2e/services/base_api_test.go +++ b/t/e2e/services/base_api_test.go @@ -4,8 +4,8 @@ import ( "encoding/json" "fmt" - "github.com/status-im/status-go/geth/api" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/api" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/signal" "github.com/status-im/status-go/t/e2e" diff --git a/t/e2e/services/filters_latest_test.go b/t/e2e/services/filters_latest_test.go index a4376a476..185409710 100644 --- a/t/e2e/services/filters_latest_test.go +++ b/t/e2e/services/filters_latest_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/params" "github.com/stretchr/testify/suite" . "github.com/status-im/status-go/t/utils" diff --git a/t/e2e/services/personal_api_test.go b/t/e2e/services/personal_api_test.go index d3f5258db..d4d6a69eb 100644 --- a/t/e2e/services/personal_api_test.go +++ b/t/e2e/services/personal_api_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/ethereum/go-ethereum/accounts/keystore" - acc "github.com/status-im/status-go/geth/account" - "github.com/status-im/status-go/geth/params" + acc "github.com/status-im/status-go/account" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/services/personal" "github.com/status-im/status-go/signal" "github.com/stretchr/testify/suite" diff --git a/t/e2e/services/status_api_test.go b/t/e2e/services/status_api_test.go index 39f37df73..39df3edad 100644 --- a/t/e2e/services/status_api_test.go +++ b/t/e2e/services/status_api_test.go @@ -6,8 +6,8 @@ import ( "strings" "testing" - "github.com/status-im/status-go/geth/account" - "github.com/status-im/status-go/geth/params" + "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/signal" "github.com/stretchr/testify/suite" diff --git a/t/e2e/suites.go b/t/e2e/suites.go index ba2a146d9..9f581b2d5 100644 --- a/t/e2e/suites.go +++ b/t/e2e/suites.go @@ -5,12 +5,12 @@ import ( whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" - "github.com/status-im/status-go/geth/api" - "github.com/status-im/status-go/geth/node" - "github.com/status-im/status-go/geth/transactions" + "github.com/status-im/status-go/api" + "github.com/status-im/status-go/node" "github.com/status-im/status-go/sign" "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/suite" ) diff --git a/t/e2e/testing.go b/t/e2e/testing.go index 61d2c75e2..c723c12e8 100644 --- a/t/e2e/testing.go +++ b/t/e2e/testing.go @@ -4,8 +4,8 @@ import ( "context" gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/status-im/status-go/geth/node" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/node" + "github.com/status-im/status-go/params" ) // TestNodeOption is a callback passed to StartTestNode which alters its config. diff --git a/t/e2e/transactions/transactions_test.go b/t/e2e/transactions/transactions_test.go index f169c9e76..b1593bf18 100644 --- a/t/e2e/transactions/transactions_test.go +++ b/t/e2e/transactions/transactions_test.go @@ -14,13 +14,13 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/log" - "github.com/status-im/status-go/geth/account" - "github.com/status-im/status-go/geth/params" - "github.com/status-im/status-go/geth/transactions" + "github.com/status-im/status-go/account" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/sign" "github.com/status-im/status-go/signal" e2e "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" ) diff --git a/t/e2e/whisper/mailservice_test.go b/t/e2e/whisper/mailservice_test.go index 66b98f2b7..851b0359c 100644 --- a/t/e2e/whisper/mailservice_test.go +++ b/t/e2e/whisper/mailservice_test.go @@ -6,8 +6,8 @@ import ( "net/http" "testing" - "github.com/status-im/status-go/geth/node" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/node" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/t/e2e" "github.com/stretchr/testify/suite" ) diff --git a/t/e2e/whisper/whisper_ext_test.go b/t/e2e/whisper/whisper_ext_test.go index 82ce35ed9..3cf1e55f2 100644 --- a/t/e2e/whisper/whisper_ext_test.go +++ b/t/e2e/whisper/whisper_ext_test.go @@ -10,8 +10,8 @@ import ( "github.com/ethereum/go-ethereum/common" whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" - "github.com/status-im/status-go/geth/node" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/node" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/signal" "github.com/stretchr/testify/suite" ) diff --git a/t/e2e/whisper/whisper_jail_test.go b/t/e2e/whisper/whisper_jail_test.go index 9e985040a..3fec2cae0 100644 --- a/t/e2e/whisper/whisper_jail_test.go +++ b/t/e2e/whisper/whisper_jail_test.go @@ -6,7 +6,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" - "github.com/status-im/status-go/geth/jail" + "github.com/status-im/status-go/jail" "github.com/status-im/status-go/static" "github.com/status-im/status-go/t/e2e" . "github.com/status-im/status-go/t/utils" diff --git a/t/e2e/whisper/whisper_mailbox_test.go b/t/e2e/whisper/whisper_mailbox_test.go index 5e9068a47..c6a0774c2 100644 --- a/t/e2e/whisper/whisper_mailbox_test.go +++ b/t/e2e/whisper/whisper_mailbox_test.go @@ -13,8 +13,8 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p/discover" whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" - "github.com/status-im/status-go/geth/api" - "github.com/status-im/status-go/geth/rpc" + "github.com/status-im/status-go/api" + "github.com/status-im/status-go/rpc" . "github.com/status-im/status-go/t/utils" "github.com/stretchr/testify/suite" ) diff --git a/t/e2e/whisper/whisper_test.go b/t/e2e/whisper/whisper_test.go index 688d966ef..0dcf608eb 100644 --- a/t/e2e/whisper/whisper_test.go +++ b/t/e2e/whisper/whisper_test.go @@ -7,7 +7,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" - "github.com/status-im/status-go/geth/account" + "github.com/status-im/status-go/account" e2e "github.com/status-im/status-go/t/e2e" . "github.com/status-im/status-go/t/utils" "github.com/stretchr/testify/suite" diff --git a/t/utils/utils.go b/t/utils/utils.go index fe2bf469d..3cf8ac7c5 100644 --- a/t/utils/utils.go +++ b/t/utils/utils.go @@ -20,7 +20,7 @@ import ( "github.com/status-im/status-go/logutils" "github.com/ethereum/go-ethereum/log" - "github.com/status-im/status-go/geth/params" + "github.com/status-im/status-go/params" "github.com/status-im/status-go/static" _ "github.com/stretchr/testify/suite" // required to register testify flags diff --git a/geth/transactions/addrlock.go b/transactions/addrlock.go similarity index 100% rename from geth/transactions/addrlock.go rename to transactions/addrlock.go diff --git a/geth/transactions/fake/mock.go b/transactions/fake/mock.go similarity index 98% rename from geth/transactions/fake/mock.go rename to transactions/fake/mock.go index 460111508..24cb6368e 100644 --- a/geth/transactions/fake/mock.go +++ b/transactions/fake/mock.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: geth/transactions/fake/txservice.go +// Source: transactions/fake/txservice.go // Package fake is a generated GoMock package. package fake diff --git a/geth/transactions/fake/txservice.go b/transactions/fake/txservice.go similarity index 100% rename from geth/transactions/fake/txservice.go rename to transactions/fake/txservice.go diff --git a/geth/transactions/rpc_wrapper.go b/transactions/rpc_wrapper.go similarity index 98% rename from geth/transactions/rpc_wrapper.go rename to transactions/rpc_wrapper.go index eb35c8ab7..af3f0fe42 100644 --- a/geth/transactions/rpc_wrapper.go +++ b/transactions/rpc_wrapper.go @@ -10,7 +10,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" - "github.com/status-im/status-go/geth/rpc" + "github.com/status-im/status-go/rpc" ) // rpcWrapper wraps provides convenient interface for ethereum RPC APIs we need for sending transactions diff --git a/geth/transactions/transactor.go b/transactions/transactor.go similarity index 96% rename from geth/transactions/transactor.go rename to transactions/transactor.go index f6f0e9970..75122b639 100644 --- a/geth/transactions/transactor.go +++ b/transactions/transactor.go @@ -12,9 +12,9 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" - "github.com/status-im/status-go/geth/account" - "github.com/status-im/status-go/geth/params" - "github.com/status-im/status-go/geth/rpc" + "github.com/status-im/status-go/account" + "github.com/status-im/status-go/params" + "github.com/status-im/status-go/rpc" "github.com/status-im/status-go/sign" ) @@ -48,7 +48,7 @@ func NewTransactor(signRequests *sign.PendingRequests) *Transactor { addrLock: &AddrLocker{}, sendTxTimeout: sendTxTimeout, localNonce: sync.Map{}, - log: log.New("package", "status-go/geth/transactions.Manager"), + log: log.New("package", "status-go/transactions.Manager"), } } diff --git a/geth/transactions/transactor_test.go b/transactions/transactor_test.go similarity index 98% rename from geth/transactions/transactor_test.go rename to transactions/transactor_test.go index 29d219201..dc9a8f643 100644 --- a/geth/transactions/transactor_test.go +++ b/transactions/transactor_test.go @@ -21,11 +21,11 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/suite" - "github.com/status-im/status-go/geth/account" - "github.com/status-im/status-go/geth/params" - "github.com/status-im/status-go/geth/rpc" - "github.com/status-im/status-go/geth/transactions/fake" + "github.com/status-im/status-go/account" + "github.com/status-im/status-go/params" + "github.com/status-im/status-go/rpc" "github.com/status-im/status-go/sign" + "github.com/status-im/status-go/transactions/fake" . "github.com/status-im/status-go/t/utils" ) diff --git a/geth/transactions/types.go b/transactions/types.go similarity index 100% rename from geth/transactions/types.go rename to transactions/types.go diff --git a/geth/transactions/types_test.go b/transactions/types_test.go similarity index 100% rename from geth/transactions/types_test.go rename to transactions/types_test.go