Skip to content

Commit

Permalink
Add unused prival pubKey back to node info (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
LCyson authored Apr 6, 2023
1 parent 12e8692 commit 1e67899
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,13 @@ func makeNode(
}

var pubKey crypto.PubKey
if cfg.Mode == config.ModeValidator {
pubKey, err = privValidator.GetPubKey(ctx)
if err != nil {
return nil, combineCloseError(fmt.Errorf("can't get pubkey: %w", err),
makeCloser(closers))
pubKey, err = privValidator.GetPubKey(ctx)
if err != nil {
return nil, combineCloseError(fmt.Errorf("can't get pubkey: %w", err),
makeCloser(closers))
}

}
if cfg.Mode == config.ModeValidator {
if pubKey == nil {
return nil, combineCloseError(
errors.New("could not retrieve public key from private validator"),
Expand Down Expand Up @@ -415,8 +415,8 @@ func makeNode(
if privValidator != nil {
csState.SetPrivValidator(ctx, privValidator)
}
node.rpcEnv.PubKey = pubKey
}
node.rpcEnv.PubKey = pubKey

node.BaseService = *service.NewBaseService(logger, "Node", node)

Expand Down

0 comments on commit 1e67899

Please sign in to comment.