From 206c8e6e8f5025b1d963eafaf8f035772332744b Mon Sep 17 00:00:00 2001 From: arnaucube Date: Mon, 22 Mar 2021 16:51:10 +0100 Subject: [PATCH] Move apitypes & stateapiupdater into api dir --- api/account_test.go | 2 +- api/accountcreationauths.go | 2 +- api/api_test.go | 2 +- {apitypes => api/apitypes}/apitypes.go | 0 {apitypes => api/apitypes}/apitypes_test.go | 0 api/batch_test.go | 2 +- api/exits_test.go | 2 +- api/state_test.go | 2 +- {stateapiupdater => api/stateapiupdater}/stateapiupdater.go | 0 api/txshistory_test.go | 2 +- api/txspool.go | 2 +- db/historydb/apiqueries.go | 2 +- db/historydb/historydb_test.go | 2 +- db/historydb/nodeinfo.go | 2 +- db/historydb/views.go | 2 +- db/l2db/views.go | 2 +- node/node.go | 2 +- 17 files changed, 14 insertions(+), 14 deletions(-) rename {apitypes => api/apitypes}/apitypes.go (100%) rename {apitypes => api/apitypes}/apitypes_test.go (100%) rename {stateapiupdater => api/stateapiupdater}/stateapiupdater.go (100%) diff --git a/api/account_test.go b/api/account_test.go index 4058091..703c728 100644 --- a/api/account_test.go +++ b/api/account_test.go @@ -5,7 +5,7 @@ import ( "strconv" "testing" - "github.com/hermeznetwork/hermez-node/apitypes" + "github.com/hermeznetwork/hermez-node/api/apitypes" "github.com/hermeznetwork/hermez-node/common" "github.com/hermeznetwork/hermez-node/db/historydb" "github.com/mitchellh/copystructure" diff --git a/api/accountcreationauths.go b/api/accountcreationauths.go index 0fa7c85..f5a562d 100644 --- a/api/accountcreationauths.go +++ b/api/accountcreationauths.go @@ -7,7 +7,7 @@ import ( ethCommon "github.com/ethereum/go-ethereum/common" "github.com/gin-gonic/gin" - "github.com/hermeznetwork/hermez-node/apitypes" + "github.com/hermeznetwork/hermez-node/api/apitypes" "github.com/hermeznetwork/hermez-node/common" "github.com/iden3/go-iden3-crypto/babyjub" ) diff --git a/api/api_test.go b/api/api_test.go index 001aed1..a6ff1a9 100644 --- a/api/api_test.go +++ b/api/api_test.go @@ -19,12 +19,12 @@ import ( ethCommon "github.com/ethereum/go-ethereum/common" swagger "github.com/getkin/kin-openapi/openapi3filter" "github.com/gin-gonic/gin" + "github.com/hermeznetwork/hermez-node/api/stateapiupdater" "github.com/hermeznetwork/hermez-node/common" "github.com/hermeznetwork/hermez-node/db" "github.com/hermeznetwork/hermez-node/db/historydb" "github.com/hermeznetwork/hermez-node/db/l2db" "github.com/hermeznetwork/hermez-node/log" - "github.com/hermeznetwork/hermez-node/stateapiupdater" "github.com/hermeznetwork/hermez-node/test" "github.com/hermeznetwork/hermez-node/test/til" "github.com/hermeznetwork/hermez-node/test/txsets" diff --git a/apitypes/apitypes.go b/api/apitypes/apitypes.go similarity index 100% rename from apitypes/apitypes.go rename to api/apitypes/apitypes.go diff --git a/apitypes/apitypes_test.go b/api/apitypes/apitypes_test.go similarity index 100% rename from apitypes/apitypes_test.go rename to api/apitypes/apitypes_test.go diff --git a/api/batch_test.go b/api/batch_test.go index 5f74a70..e45d91c 100644 --- a/api/batch_test.go +++ b/api/batch_test.go @@ -7,7 +7,7 @@ import ( "time" ethCommon "github.com/ethereum/go-ethereum/common" - "github.com/hermeznetwork/hermez-node/apitypes" + "github.com/hermeznetwork/hermez-node/api/apitypes" "github.com/hermeznetwork/hermez-node/common" "github.com/hermeznetwork/hermez-node/db/historydb" "github.com/mitchellh/copystructure" diff --git a/api/exits_test.go b/api/exits_test.go index 440f39c..085add7 100644 --- a/api/exits_test.go +++ b/api/exits_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/hermeznetwork/hermez-node/apitypes" + "github.com/hermeznetwork/hermez-node/api/apitypes" "github.com/hermeznetwork/hermez-node/common" "github.com/hermeznetwork/hermez-node/db/historydb" "github.com/mitchellh/copystructure" diff --git a/api/state_test.go b/api/state_test.go index f2c7712..55a919f 100644 --- a/api/state_test.go +++ b/api/state_test.go @@ -4,7 +4,7 @@ import ( "math/big" "testing" - "github.com/hermeznetwork/hermez-node/apitypes" + "github.com/hermeznetwork/hermez-node/api/apitypes" "github.com/hermeznetwork/hermez-node/common" "github.com/hermeznetwork/hermez-node/db/historydb" "github.com/stretchr/testify/assert" diff --git a/stateapiupdater/stateapiupdater.go b/api/stateapiupdater/stateapiupdater.go similarity index 100% rename from stateapiupdater/stateapiupdater.go rename to api/stateapiupdater/stateapiupdater.go diff --git a/api/txshistory_test.go b/api/txshistory_test.go index a3e5aef..752ce74 100644 --- a/api/txshistory_test.go +++ b/api/txshistory_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/hermeznetwork/hermez-node/apitypes" + "github.com/hermeznetwork/hermez-node/api/apitypes" "github.com/hermeznetwork/hermez-node/common" "github.com/hermeznetwork/hermez-node/db/historydb" "github.com/hermeznetwork/hermez-node/test" diff --git a/api/txspool.go b/api/txspool.go index dce64b1..11cd878 100644 --- a/api/txspool.go +++ b/api/txspool.go @@ -8,7 +8,7 @@ import ( ethCommon "github.com/ethereum/go-ethereum/common" "github.com/gin-gonic/gin" - "github.com/hermeznetwork/hermez-node/apitypes" + "github.com/hermeznetwork/hermez-node/api/apitypes" "github.com/hermeznetwork/hermez-node/common" "github.com/hermeznetwork/hermez-node/db/l2db" "github.com/hermeznetwork/tracerr" diff --git a/db/historydb/apiqueries.go b/db/historydb/apiqueries.go index 6731f31..e3dfad1 100644 --- a/db/historydb/apiqueries.go +++ b/db/historydb/apiqueries.go @@ -8,7 +8,7 @@ import ( "time" ethCommon "github.com/ethereum/go-ethereum/common" - "github.com/hermeznetwork/hermez-node/apitypes" + "github.com/hermeznetwork/hermez-node/api/apitypes" "github.com/hermeznetwork/hermez-node/common" "github.com/hermeznetwork/hermez-node/db" "github.com/hermeznetwork/tracerr" diff --git a/db/historydb/historydb_test.go b/db/historydb/historydb_test.go index 2013d4b..744da1f 100644 --- a/db/historydb/historydb_test.go +++ b/db/historydb/historydb_test.go @@ -11,7 +11,7 @@ import ( "time" ethCommon "github.com/ethereum/go-ethereum/common" - "github.com/hermeznetwork/hermez-node/apitypes" + "github.com/hermeznetwork/hermez-node/api/apitypes" "github.com/hermeznetwork/hermez-node/common" dbUtils "github.com/hermeznetwork/hermez-node/db" "github.com/hermeznetwork/hermez-node/log" diff --git a/db/historydb/nodeinfo.go b/db/historydb/nodeinfo.go index 8f54c72..06ecfc7 100644 --- a/db/historydb/nodeinfo.go +++ b/db/historydb/nodeinfo.go @@ -4,7 +4,7 @@ import ( "time" ethCommon "github.com/ethereum/go-ethereum/common" - "github.com/hermeznetwork/hermez-node/apitypes" + "github.com/hermeznetwork/hermez-node/api/apitypes" "github.com/hermeznetwork/hermez-node/common" "github.com/hermeznetwork/tracerr" "github.com/russross/meddler" diff --git a/db/historydb/views.go b/db/historydb/views.go index cf2aba7..8feb00d 100644 --- a/db/historydb/views.go +++ b/db/historydb/views.go @@ -6,7 +6,7 @@ import ( "time" ethCommon "github.com/ethereum/go-ethereum/common" - "github.com/hermeznetwork/hermez-node/apitypes" + "github.com/hermeznetwork/hermez-node/api/apitypes" "github.com/hermeznetwork/hermez-node/common" "github.com/iden3/go-iden3-crypto/babyjub" "github.com/iden3/go-merkletree" diff --git a/db/l2db/views.go b/db/l2db/views.go index 5ae47a4..7f6a752 100644 --- a/db/l2db/views.go +++ b/db/l2db/views.go @@ -6,7 +6,7 @@ import ( "time" ethCommon "github.com/ethereum/go-ethereum/common" - "github.com/hermeznetwork/hermez-node/apitypes" + "github.com/hermeznetwork/hermez-node/api/apitypes" "github.com/hermeznetwork/hermez-node/common" "github.com/iden3/go-iden3-crypto/babyjub" ) diff --git a/node/node.go b/node/node.go index 4342252..61bea3f 100644 --- a/node/node.go +++ b/node/node.go @@ -15,6 +15,7 @@ import ( "github.com/gin-contrib/cors" "github.com/gin-gonic/gin" "github.com/hermeznetwork/hermez-node/api" + "github.com/hermeznetwork/hermez-node/api/stateapiupdater" "github.com/hermeznetwork/hermez-node/batchbuilder" "github.com/hermeznetwork/hermez-node/common" "github.com/hermeznetwork/hermez-node/config" @@ -27,7 +28,6 @@ import ( "github.com/hermeznetwork/hermez-node/log" "github.com/hermeznetwork/hermez-node/priceupdater" "github.com/hermeznetwork/hermez-node/prover" - "github.com/hermeznetwork/hermez-node/stateapiupdater" "github.com/hermeznetwork/hermez-node/synchronizer" "github.com/hermeznetwork/hermez-node/test/debugapi" "github.com/hermeznetwork/hermez-node/txprocessor"