mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-04 07:07:13 +00:00
config: seperate priv validator config into seperate section (#6462)
Addresses a beginning component of #6255
This commit is contained in:
@@ -266,22 +266,22 @@ func MakeConfig(node *e2e.Node) (*config.Config, error) {
|
||||
// it's actually needed (e.g. for remote KMS or non-validators). We set up a dummy
|
||||
// key here by default, and use the real key for actual validators that should use
|
||||
// the file privval.
|
||||
cfg.PrivValidatorListenAddr = ""
|
||||
cfg.PrivValidatorKey = PrivvalDummyKeyFile
|
||||
cfg.PrivValidatorState = PrivvalDummyStateFile
|
||||
cfg.PrivValidator.ListenAddr = ""
|
||||
cfg.PrivValidator.Key = PrivvalDummyKeyFile
|
||||
cfg.PrivValidator.State = PrivvalDummyStateFile
|
||||
|
||||
switch node.Mode {
|
||||
case e2e.ModeValidator:
|
||||
switch node.PrivvalProtocol {
|
||||
case e2e.ProtocolFile:
|
||||
cfg.PrivValidatorKey = PrivvalKeyFile
|
||||
cfg.PrivValidatorState = PrivvalStateFile
|
||||
cfg.PrivValidator.Key = PrivvalKeyFile
|
||||
cfg.PrivValidator.State = PrivvalStateFile
|
||||
case e2e.ProtocolUNIX:
|
||||
cfg.PrivValidatorListenAddr = PrivvalAddressUNIX
|
||||
cfg.PrivValidator.ListenAddr = PrivvalAddressUNIX
|
||||
case e2e.ProtocolTCP:
|
||||
cfg.PrivValidatorListenAddr = PrivvalAddressTCP
|
||||
cfg.PrivValidator.ListenAddr = PrivvalAddressTCP
|
||||
case e2e.ProtocolGRPC:
|
||||
cfg.PrivValidatorListenAddr = PrivvalAddressGRPC
|
||||
cfg.PrivValidator.ListenAddr = PrivvalAddressGRPC
|
||||
default:
|
||||
return nil, fmt.Errorf("invalid privval protocol setting %q", node.PrivvalProtocol)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user