mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-10 15:07:24 +00:00
config: seperate priv validator config into seperate section (#6462)
Addresses a beginning component of #6255
This commit is contained in:
@@ -173,8 +173,8 @@ func NewNode(config *cfg.Config,
|
||||
|
||||
// If an address is provided, listen on the socket for a connection from an
|
||||
// external signing process.
|
||||
if config.PrivValidatorListenAddr != "" {
|
||||
protocol, _ := tmnet.ProtocolAndAddress(config.PrivValidatorListenAddr)
|
||||
if config.PrivValidator.ListenAddr != "" {
|
||||
protocol, _ := tmnet.ProtocolAndAddress(config.PrivValidator.ListenAddr)
|
||||
// FIXME: we should start services inside OnStart
|
||||
switch protocol {
|
||||
case "grpc":
|
||||
@@ -183,7 +183,7 @@ func NewNode(config *cfg.Config,
|
||||
return nil, fmt.Errorf("error with private validator grpc client: %w", err)
|
||||
}
|
||||
default:
|
||||
privValidator, err = createAndStartPrivValidatorSocketClient(config.PrivValidatorListenAddr, genDoc.ChainID, logger)
|
||||
privValidator, err = createAndStartPrivValidatorSocketClient(config.PrivValidator.ListenAddr, genDoc.ChainID, logger)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error with private validator socket client: %w", err)
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ func TestNodeSetPrivValTCP(t *testing.T) {
|
||||
|
||||
config := cfg.ResetTestRoot("node_priv_val_tcp_test")
|
||||
defer os.RemoveAll(config.RootDir)
|
||||
config.BaseConfig.PrivValidatorListenAddr = addr
|
||||
config.PrivValidator.ListenAddr = addr
|
||||
|
||||
dialer := privval.DialTCPFn(addr, 100*time.Millisecond, ed25519.GenPrivKey())
|
||||
dialerEndpoint := privval.NewSignerDialerEndpoint(
|
||||
@@ -156,7 +156,7 @@ func TestPrivValidatorListenAddrNoProtocol(t *testing.T) {
|
||||
|
||||
config := cfg.ResetTestRoot("node_priv_val_tcp_test")
|
||||
defer os.RemoveAll(config.RootDir)
|
||||
config.BaseConfig.PrivValidatorListenAddr = addrNoPrefix
|
||||
config.PrivValidator.ListenAddr = addrNoPrefix
|
||||
|
||||
_, err := DefaultNewNode(config, log.TestingLogger())
|
||||
assert.Error(t, err)
|
||||
@@ -168,7 +168,7 @@ func TestNodeSetPrivValIPC(t *testing.T) {
|
||||
|
||||
config := cfg.ResetTestRoot("node_priv_val_tcp_test")
|
||||
defer os.RemoveAll(config.RootDir)
|
||||
config.BaseConfig.PrivValidatorListenAddr = "unix://" + tmpfile
|
||||
config.PrivValidator.ListenAddr = "unix://" + tmpfile
|
||||
|
||||
dialer := privval.DialUnixFn(tmpfile)
|
||||
dialerEndpoint := privval.NewSignerDialerEndpoint(
|
||||
|
||||
Reference in New Issue
Block a user