*: goimports
This commit is contained in:
parent
014be31a0a
commit
884779e501
6 changed files with 20 additions and 20 deletions
|
@ -66,20 +66,20 @@ type (
|
||||||
|
|
||||||
// ApplicationConfiguration config specific to the node.
|
// ApplicationConfiguration config specific to the node.
|
||||||
ApplicationConfiguration struct {
|
ApplicationConfiguration struct {
|
||||||
LogPath string `yaml:"LogPath"`
|
LogPath string `yaml:"LogPath"`
|
||||||
DBConfiguration storage.DBConfiguration `yaml:"DBConfiguration"`
|
DBConfiguration storage.DBConfiguration `yaml:"DBConfiguration"`
|
||||||
Address string `yaml:"Address"`
|
Address string `yaml:"Address"`
|
||||||
NodePort uint16 `yaml:"NodePort"`
|
NodePort uint16 `yaml:"NodePort"`
|
||||||
Relay bool `yaml:"Relay"`
|
Relay bool `yaml:"Relay"`
|
||||||
DialTimeout time.Duration `yaml:"DialTimeout"`
|
DialTimeout time.Duration `yaml:"DialTimeout"`
|
||||||
ProtoTickInterval time.Duration `yaml:"ProtoTickInterval"`
|
ProtoTickInterval time.Duration `yaml:"ProtoTickInterval"`
|
||||||
MaxPeers int `yaml:"MaxPeers"`
|
MaxPeers int `yaml:"MaxPeers"`
|
||||||
AttemptConnPeers int `yaml:"AttemptConnPeers"`
|
AttemptConnPeers int `yaml:"AttemptConnPeers"`
|
||||||
MinPeers int `yaml:"MinPeers"`
|
MinPeers int `yaml:"MinPeers"`
|
||||||
Prometheus metrics.Config `yaml:"Prometheus"`
|
Prometheus metrics.Config `yaml:"Prometheus"`
|
||||||
Pprof metrics.Config `yaml:"Pprof"`
|
Pprof metrics.Config `yaml:"Pprof"`
|
||||||
RPC RPCConfig `yaml:"RPC"`
|
RPC RPCConfig `yaml:"RPC"`
|
||||||
UnlockWallet WalletConfig `yaml:"UnlockWallet"`
|
UnlockWallet WalletConfig `yaml:"UnlockWallet"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// WalletConfig is a wallet info.
|
// WalletConfig is a wallet info.
|
||||||
|
|
|
@ -29,7 +29,7 @@ type Blockchainer interface {
|
||||||
HasTransaction(util.Uint256) bool
|
HasTransaction(util.Uint256) bool
|
||||||
GetAssetState(util.Uint256) *state.Asset
|
GetAssetState(util.Uint256) *state.Asset
|
||||||
GetAccountState(util.Uint160) *state.Account
|
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)
|
GetScriptHashesForVerifying(*transaction.Transaction) ([]util.Uint160, error)
|
||||||
GetStorageItem(scripthash util.Uint160, key []byte) *state.StorageItem
|
GetStorageItem(scripthash util.Uint160, key []byte) *state.StorageItem
|
||||||
GetStorageItems(hash util.Uint160) (map[string]*state.StorageItem, error)
|
GetStorageItems(hash util.Uint160) (map[string]*state.StorageItem, error)
|
||||||
|
|
|
@ -6,4 +6,3 @@ type slice []uint32
|
||||||
func (p slice) Len() int { return len(p) }
|
func (p slice) Len() int { return len(p) }
|
||||||
func (p slice) Less(i, j int) bool { return p[i] < p[j] }
|
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] }
|
func (p slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ func (ms *Service) Start() {
|
||||||
if ms.config.Enabled {
|
if ms.config.Enabled {
|
||||||
log.WithFields(log.Fields{
|
log.WithFields(log.Fields{
|
||||||
"endpoint": ms.Addr,
|
"endpoint": ms.Addr,
|
||||||
"service": ms.serviceType,
|
"service": ms.serviceType,
|
||||||
}).Info("service running")
|
}).Info("service running")
|
||||||
err := ms.ListenAndServe()
|
err := ms.ListenAndServe()
|
||||||
if err != nil && err != http.ErrServerClosed {
|
if err != nil && err != http.ErrServerClosed {
|
||||||
|
@ -41,10 +41,10 @@ func (ms *Service) Start() {
|
||||||
func (ms *Service) ShutDown() {
|
func (ms *Service) ShutDown() {
|
||||||
log.WithFields(log.Fields{
|
log.WithFields(log.Fields{
|
||||||
"endpoint": ms.Addr,
|
"endpoint": ms.Addr,
|
||||||
"service": ms.serviceType,
|
"service": ms.serviceType,
|
||||||
}).Info("shutting down service")
|
}).Info("shutting down service")
|
||||||
err := ms.Shutdown(context.Background())
|
err := ms.Shutdown(context.Background())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("can't shut down %s service", ms.serviceType)
|
log.Fatalf("can't shut down %s service", ms.serviceType)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/pprof"
|
"net/http/pprof"
|
||||||
)
|
)
|
||||||
|
|
||||||
// PprofService https://golang.org/pkg/net/http/pprof/.
|
// PprofService https://golang.org/pkg/net/http/pprof/.
|
||||||
type PprofService Service
|
type PprofService Service
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@ package wrappers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/CityOfZion/neo-go/pkg/core/state"
|
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
|
"github.com/CityOfZion/neo-go/pkg/core/state"
|
||||||
"github.com/CityOfZion/neo-go/pkg/crypto/keys"
|
"github.com/CityOfZion/neo-go/pkg/crypto/keys"
|
||||||
"github.com/CityOfZion/neo-go/pkg/util"
|
"github.com/CityOfZion/neo-go/pkg/util"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue