[cmd] fix config persist

pull/3734/head
Peter Chung 4 years ago
parent 74dfd53e0a
commit 1ed07e93d1
  1. 2
      cmd/harmony/main.go
  2. 4
      internal/configs/harmony/harmony.go
  3. 6
      rpc/debug.go
  4. BIN
      scripts/staging/v3.0.0/harmony-amd64

@ -382,7 +382,7 @@ func setupNodeAndRun(hc harmonyconfig.HarmonyConfig) {
nodeconfig.SetPeerID(myHost.GetID())
if hc.Log.VerbosePrints["config"] {
if val, ok := hc.Log.VerbosePrints["config"]; ok && val {
utils.Logger().Info().Interface("config", rpc_common.Config{
HarmonyConfig: hc,
NodeConfig: *nodeConfig,

@ -90,8 +90,8 @@ type LogConfig struct {
FileName string
RotateSize int
Verbosity int
VerbosePrints map[string]bool
Context *LogContext `toml:",omitempty"`
VerbosePrints map[string]bool `toml:",omitempty"`
Context *LogContext `toml:",omitempty"`
}
type LogContext struct {

@ -3,8 +3,6 @@ package rpc
import (
"context"
commonRPC "github.com/harmony-one/harmony/rpc/common"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rpc"
"github.com/harmony-one/harmony/hmy"
@ -70,6 +68,6 @@ func (s *PrivateDebugService) GetConsensusPhase(
// GetConfig get harmony config
func (s *PrivateDebugService) GetConfig(
ctx context.Context,
) commonRPC.Config {
return s.hmy.NodeAPI.GetConfig()
) (StructuredResponse, error) {
return NewStructuredResponse(s.hmy.NodeAPI.GetConfig())
}

Loading…
Cancel
Save