Handle keystore in validator credentials set.

This commit is contained in:
Jim McDonald
2023-02-27 22:07:45 +00:00
parent 7087a0a55c
commit 9ae927feab
2 changed files with 13 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
dev:
- allow use of keystores with validator credentials set
1.28.4:
- allow validator exit to use a keystore as its validator parameter

View File

@@ -329,7 +329,16 @@ func (c *command) generateOperationsFromAccountAndPrivateKey(ctx context.Context
}
func (c *command) generateOperationsFromValidatorAndPrivateKey(ctx context.Context) error {
validatorInfo, err := c.chainInfo.FetchValidatorInfo(ctx, c.validator)
validatorAccount, err := util.ParseAccount(ctx, c.validator, nil, false)
if err != nil {
return err
}
validatorPubkey, err := util.BestPublicKey(validatorAccount)
if err != nil {
return err
}
validatorInfo, err := c.chainInfo.FetchValidatorInfo(ctx, fmt.Sprintf("%#x", validatorPubkey.Marshal()))
if err != nil {
return err
}