try to make goimports happy

pull/3734/head
Peter Chung 4 years ago
parent 9fe7a51efa
commit 1877d8e610
  1. 3
      cmd/harmony/bls.go
  2. 7
      cmd/harmony/flags.go
  3. 10
      cmd/harmony/flags_test.go
  4. 7
      cmd/harmony/main.go
  5. 6
      node/api.go
  6. 4
      node/node.go
  7. 7
      rpc/common/types.go
  8. 1
      rpc/debug.go

@ -2,10 +2,11 @@ package main
import (
"fmt"
harmonyconfig "github.com/harmony-one/harmony/internal/configs/harmony"
"os"
"sync"
harmonyconfig "github.com/harmony-one/harmony/internal/configs/harmony"
"github.com/harmony-one/harmony/internal/blsgen"
nodeconfig "github.com/harmony-one/harmony/internal/configs/node"
"github.com/harmony-one/harmony/multibls"

@ -2,10 +2,11 @@ package main
import (
"fmt"
harmonyconfig "github.com/harmony-one/harmony/internal/configs/harmony"
"strconv"
"strings"
harmonyconfig "github.com/harmony-one/harmony/internal/configs/harmony"
"github.com/harmony-one/harmony/api/service/legacysync"
"github.com/harmony-one/harmony/internal/cli"
nodeconfig "github.com/harmony-one/harmony/internal/configs/node"
@ -996,8 +997,8 @@ var (
DefValue: defaultConfig.Log.Verbosity,
}
verbosePrintsFlag = cli.StringSliceFlag{
Name: "verbose-prints",
Usage: "verbose prints, available options: config",
Name: "verbose-prints",
Usage: "verbose prints, available options: config",
}
// TODO: remove context (this shall not be in the log)
logContextIPFlag = cli.StringFlag{

@ -855,12 +855,12 @@ func TestLogFlags(t *testing.T) {
{
args: []string{"--verbose-prints", "config"},
expConfig: logConfig{
Folder: defaultConfig.Log.Folder,
FileName: defaultConfig.Log.FileName,
RotateSize: defaultConfig.Log.RotateSize,
Verbosity: defaultConfig.Log.Verbosity,
Folder: defaultConfig.Log.Folder,
FileName: defaultConfig.Log.FileName,
RotateSize: defaultConfig.Log.RotateSize,
Verbosity: defaultConfig.Log.Verbosity,
VerbosePrints: []string{"config"},
Context: nil,
Context: nil,
},
},
}

@ -2,8 +2,6 @@ package main
import (
"fmt"
harmonyconfig "github.com/harmony-one/harmony/internal/configs/harmony"
rpc_common "github.com/harmony-one/harmony/rpc/common"
"io/ioutil"
"math/big"
"math/rand"
@ -18,6 +16,9 @@ import (
"syscall"
"time"
harmonyconfig "github.com/harmony-one/harmony/internal/configs/harmony"
rpc_common "github.com/harmony-one/harmony/rpc/common"
ethCommon "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
"github.com/harmony-one/bls/ffi/go/bls"
@ -207,7 +208,7 @@ func getHarmonyConfig(cmd *cobra.Command) (harmonyconfig.HarmonyConfig, error) {
return config, nil
}
func applyRootFlags(cmd *cobra.Command, config * harmonyconfig.HarmonyConfig) {
func applyRootFlags(cmd *cobra.Command, config *harmonyconfig.HarmonyConfig) {
// Misc flags shall be applied first since legacy ip / port is overwritten
// by new ip / port flags
applyLegacyMiscFlags(cmd, config)

@ -146,7 +146,7 @@ func (node *Node) GetConsensusInternal() rpc_common.ConsensusInternal {
func (node *Node) GetConfig() rpc_common.Config {
return rpc_common.Config{
HarmonyConfig: node.HarmonyConfig,
NodeConfig: *node.NodeConfig,
ChainConfig: node.chainConfig,
NodeConfig: *node.NodeConfig,
ChainConfig: node.chainConfig,
}
}
}

@ -3,7 +3,6 @@ package node
import (
"context"
"fmt"
"github.com/harmony-one/harmony/internal/configs/harmony"
"math/big"
"os"
"strings"
@ -11,6 +10,7 @@ import (
"time"
"github.com/ethereum/go-ethereum/rlp"
"github.com/harmony-one/harmony/internal/configs/harmony"
"github.com/ethereum/go-ethereum/common"
protobuf "github.com/golang/protobuf/proto"
@ -106,7 +106,7 @@ type Node struct {
ContractAddresses []common.Address
// Channel to notify consensus service to really start consensus
startConsensus chan struct{}
HarmonyConfig harmony.HarmonyConfig
HarmonyConfig harmony.HarmonyConfig
// node configuration, including group ID, shard ID, etc
NodeConfig *nodeconfig.ConfigType
// Chain configuration.

@ -2,6 +2,7 @@ package common
import (
"encoding/json"
harmonyconfig "github.com/harmony-one/harmony/internal/configs/harmony"
nodeconfig "github.com/harmony-one/harmony/internal/configs/node"
@ -85,6 +86,6 @@ type NodePeerInfo struct {
type Config struct {
HarmonyConfig harmonyconfig.HarmonyConfig
NodeConfig nodeconfig.ConfigType
ChainConfig params.ChainConfig
}
NodeConfig nodeconfig.ConfigType
ChainConfig params.ChainConfig
}

@ -2,6 +2,7 @@ package rpc
import (
"context"
commonRPC "github.com/harmony-one/harmony/rpc/common"
"github.com/ethereum/go-ethereum/log"

Loading…
Cancel
Save