From 55009bfa662cddc1ef38a0abb25fc5b13ca85a46 Mon Sep 17 00:00:00 2001 From: Raul Jordan Date: Fri, 24 Jul 2020 16:36:28 -0500 Subject: [PATCH] Fix Validator Accounts-V2 Runtime (#6714) * fix accounts v2 runtime --- validator/node/node.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/validator/node/node.go b/validator/node/node.go index 7ee3570ff..53b3637ab 100644 --- a/validator/node/node.go +++ b/validator/node/node.go @@ -79,11 +79,8 @@ func NewValidatorClient(cliCtx *cli.Context) (*ValidatorClient, error) { cmd.ConfigureValidator(cliCtx) featureconfig.ConfigureValidator(cliCtx) - keyManagerV1, err := selectV1Keymanager(cliCtx) - if err != nil { - return nil, err - } + var keyManagerV1 v1.KeyManager var keyManagerV2 v2.IKeymanager if featureconfig.Get().EnableAccountsV2 { walletDir := cliCtx.String(flags.WalletDirFlag.Name) @@ -105,6 +102,11 @@ func NewValidatorClient(cliCtx *cli.Context) (*ValidatorClient, error) { if err != nil { log.Fatalf("Could not read existing keymanager for wallet: %v", err) } + } else { + keyManagerV1, err = selectV1Keymanager(cliCtx) + if err != nil { + return nil, err + } } pubKeys, err := ExtractPublicKeysFromKeymanager(cliCtx, keyManagerV1, keyManagerV2)