diff --git a/pkg/config/application_config.go b/pkg/config/application_config.go index 21637c887..9c61cb9a3 100644 --- a/pkg/config/application_config.go +++ b/pkg/config/application_config.go @@ -6,7 +6,6 @@ import ( "github.com/nspcc-dev/neo-go/pkg/core/storage" "github.com/nspcc-dev/neo-go/pkg/network/metrics" "github.com/nspcc-dev/neo-go/pkg/rpc" - "github.com/nspcc-dev/neo-go/pkg/wallet" ) // ApplicationConfiguration config specific to the node. @@ -26,5 +25,5 @@ type ApplicationConfiguration struct { ProtoTickInterval time.Duration `yaml:"ProtoTickInterval"` Relay bool `yaml:"Relay"` RPC rpc.Config `yaml:"RPC"` - UnlockWallet wallet.Config `yaml:"UnlockWallet"` + UnlockWallet Wallet `yaml:"UnlockWallet"` } diff --git a/pkg/wallet/wallet_config.go b/pkg/config/wallet_config.go similarity index 51% rename from pkg/wallet/wallet_config.go rename to pkg/config/wallet_config.go index 8b5d790b6..8edf42339 100644 --- a/pkg/wallet/wallet_config.go +++ b/pkg/config/wallet_config.go @@ -1,7 +1,7 @@ -package wallet +package config -// Config is a wallet info. -type Config struct { +// Wallet is a wallet info. +type Wallet struct { Path string `yaml:"Path"` Password string `yaml:"Password"` } diff --git a/pkg/consensus/consensus.go b/pkg/consensus/consensus.go index 783501d7f..364e5308f 100644 --- a/pkg/consensus/consensus.go +++ b/pkg/consensus/consensus.go @@ -9,6 +9,7 @@ import ( "github.com/nspcc-dev/dbft/block" "github.com/nspcc-dev/dbft/crypto" "github.com/nspcc-dev/dbft/payload" + "github.com/nspcc-dev/neo-go/pkg/config" "github.com/nspcc-dev/neo-go/pkg/config/netmode" coreb "github.com/nspcc-dev/neo-go/pkg/core/block" "github.com/nspcc-dev/neo-go/pkg/core/blockchainer" @@ -80,7 +81,7 @@ type Config struct { // TimePerBlock minimal time that should pass before next block is accepted. TimePerBlock time.Duration // Wallet is a local-node wallet configuration. - Wallet *wallet.Config + Wallet *config.Wallet } // NewService returns new consensus.Service instance. diff --git a/pkg/consensus/consensus_test.go b/pkg/consensus/consensus_test.go index 196bdd5cf..240ca6a7a 100644 --- a/pkg/consensus/consensus_test.go +++ b/pkg/consensus/consensus_test.go @@ -17,7 +17,6 @@ import ( "github.com/nspcc-dev/neo-go/pkg/util" "github.com/nspcc-dev/neo-go/pkg/vm/emit" "github.com/nspcc-dev/neo-go/pkg/vm/opcode" - "github.com/nspcc-dev/neo-go/pkg/wallet" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" ) @@ -202,7 +201,7 @@ func newTestService(t *testing.T) *service { Broadcast: func(*Payload) {}, Chain: newTestChain(t), RequestTx: func(...util.Uint256) {}, - Wallet: &wallet.Config{ + Wallet: &config.Wallet{ Path: "./testdata/wallet1.json", Password: "one", }, diff --git a/pkg/network/server_config.go b/pkg/network/server_config.go index a84458e3a..a1ccd0e07 100644 --- a/pkg/network/server_config.go +++ b/pkg/network/server_config.go @@ -5,7 +5,6 @@ import ( "github.com/nspcc-dev/neo-go/pkg/config" "github.com/nspcc-dev/neo-go/pkg/config/netmode" - "github.com/nspcc-dev/neo-go/pkg/wallet" "go.uber.org/zap/zapcore" ) @@ -63,7 +62,7 @@ type ( LogLevel zapcore.Level // Wallet is a wallet configuration. - Wallet *wallet.Config + Wallet *config.Wallet // TimePerBlock is an interval which should pass between two successive blocks. TimePerBlock time.Duration @@ -76,7 +75,7 @@ func NewServerConfig(cfg config.Config) ServerConfig { appConfig := cfg.ApplicationConfiguration protoConfig := cfg.ProtocolConfiguration - var wc *wallet.Config + var wc *config.Wallet if appConfig.UnlockWallet.Path != "" { wc = &appConfig.UnlockWallet }