From 884779e501fecb0a1f6f1dfb35e5d89a49e84716 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 17 Dec 2019 14:51:07 +0300 Subject: [PATCH] *: goimports --- config/config.go | 28 ++++++++++++++-------------- pkg/core/blockchainer.go | 2 +- pkg/core/uint32.go | 1 - pkg/network/metrics/metrics.go | 6 +++--- pkg/network/metrics/pprof.go | 1 + pkg/rpc/wrappers/account_state.go | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/config/config.go b/config/config.go index 74b03f4ac..cf86d9e32 100644 --- a/config/config.go +++ b/config/config.go @@ -66,20 +66,20 @@ type ( // ApplicationConfiguration config specific to the node. ApplicationConfiguration struct { - LogPath string `yaml:"LogPath"` - DBConfiguration storage.DBConfiguration `yaml:"DBConfiguration"` - Address string `yaml:"Address"` - NodePort uint16 `yaml:"NodePort"` - Relay bool `yaml:"Relay"` - DialTimeout time.Duration `yaml:"DialTimeout"` - ProtoTickInterval time.Duration `yaml:"ProtoTickInterval"` - MaxPeers int `yaml:"MaxPeers"` - AttemptConnPeers int `yaml:"AttemptConnPeers"` - MinPeers int `yaml:"MinPeers"` - Prometheus metrics.Config `yaml:"Prometheus"` - Pprof metrics.Config `yaml:"Pprof"` - RPC RPCConfig `yaml:"RPC"` - UnlockWallet WalletConfig `yaml:"UnlockWallet"` + LogPath string `yaml:"LogPath"` + DBConfiguration storage.DBConfiguration `yaml:"DBConfiguration"` + Address string `yaml:"Address"` + NodePort uint16 `yaml:"NodePort"` + Relay bool `yaml:"Relay"` + DialTimeout time.Duration `yaml:"DialTimeout"` + ProtoTickInterval time.Duration `yaml:"ProtoTickInterval"` + MaxPeers int `yaml:"MaxPeers"` + AttemptConnPeers int `yaml:"AttemptConnPeers"` + MinPeers int `yaml:"MinPeers"` + Prometheus metrics.Config `yaml:"Prometheus"` + Pprof metrics.Config `yaml:"Pprof"` + RPC RPCConfig `yaml:"RPC"` + UnlockWallet WalletConfig `yaml:"UnlockWallet"` } // WalletConfig is a wallet info. diff --git a/pkg/core/blockchainer.go b/pkg/core/blockchainer.go index 9d42d0af6..8493dec80 100644 --- a/pkg/core/blockchainer.go +++ b/pkg/core/blockchainer.go @@ -29,7 +29,7 @@ type Blockchainer interface { HasTransaction(util.Uint256) bool GetAssetState(util.Uint256) *state.Asset GetAccountState(util.Uint160) *state.Account - GetValidators(txes... *transaction.Transaction) ([]*keys.PublicKey, error) + GetValidators(txes ...*transaction.Transaction) ([]*keys.PublicKey, error) GetScriptHashesForVerifying(*transaction.Transaction) ([]util.Uint160, error) GetStorageItem(scripthash util.Uint160, key []byte) *state.StorageItem GetStorageItems(hash util.Uint160) (map[string]*state.StorageItem, error) diff --git a/pkg/core/uint32.go b/pkg/core/uint32.go index 27e27fb94..e86688e38 100644 --- a/pkg/core/uint32.go +++ b/pkg/core/uint32.go @@ -6,4 +6,3 @@ type slice []uint32 func (p slice) Len() int { return len(p) } func (p slice) Less(i, j int) bool { return p[i] < p[j] } func (p slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - diff --git a/pkg/network/metrics/metrics.go b/pkg/network/metrics/metrics.go index f0c6d1d16..ae528990e 100644 --- a/pkg/network/metrics/metrics.go +++ b/pkg/network/metrics/metrics.go @@ -26,7 +26,7 @@ func (ms *Service) Start() { if ms.config.Enabled { log.WithFields(log.Fields{ "endpoint": ms.Addr, - "service": ms.serviceType, + "service": ms.serviceType, }).Info("service running") err := ms.ListenAndServe() if err != nil && err != http.ErrServerClosed { @@ -41,10 +41,10 @@ func (ms *Service) Start() { func (ms *Service) ShutDown() { log.WithFields(log.Fields{ "endpoint": ms.Addr, - "service": ms.serviceType, + "service": ms.serviceType, }).Info("shutting down service") err := ms.Shutdown(context.Background()) if err != nil { - log.Fatalf("can't shut down %s service", ms.serviceType) + log.Fatalf("can't shut down %s service", ms.serviceType) } } diff --git a/pkg/network/metrics/pprof.go b/pkg/network/metrics/pprof.go index 10b77fd37..f41c560e6 100644 --- a/pkg/network/metrics/pprof.go +++ b/pkg/network/metrics/pprof.go @@ -4,6 +4,7 @@ import ( "net/http" "net/http/pprof" ) + // PprofService https://golang.org/pkg/net/http/pprof/. type PprofService Service diff --git a/pkg/rpc/wrappers/account_state.go b/pkg/rpc/wrappers/account_state.go index 2d0ff5d79..ddc960337 100644 --- a/pkg/rpc/wrappers/account_state.go +++ b/pkg/rpc/wrappers/account_state.go @@ -2,9 +2,9 @@ package wrappers import ( "bytes" - "github.com/CityOfZion/neo-go/pkg/core/state" "sort" + "github.com/CityOfZion/neo-go/pkg/core/state" "github.com/CityOfZion/neo-go/pkg/crypto/keys" "github.com/CityOfZion/neo-go/pkg/util" )