mirror of
https://github.com/tendermint/tendermint.git
synced 2026-02-04 11:02:06 +00:00
Release/v0.32.11 (#4709)
* privval: retry GetPubKey, SignVote/Proposal indefinitely Fixes #4275
This commit is contained in:
14
node/node.go
14
node/node.go
@@ -1192,7 +1192,19 @@ func createAndStartPrivValidatorSocketClient(
|
||||
return nil, errors.Wrap(err, "failed to start private validator")
|
||||
}
|
||||
|
||||
return pvsc, nil
|
||||
// try to get a pubkey from private validate first time
|
||||
pubKey := pvsc.GetPubKey()
|
||||
if pubKey == nil {
|
||||
return nil, errors.New("could not retrieve public key from private validator")
|
||||
}
|
||||
|
||||
const (
|
||||
retries = 50 // 50 * 100ms = 5s total
|
||||
timeout = 100 * time.Millisecond
|
||||
)
|
||||
pvscWithRetries := privval.NewRetrySignerClient(pvsc, retries, timeout)
|
||||
|
||||
return pvscWithRetries, nil
|
||||
}
|
||||
|
||||
// splitAndTrimEmpty slices s into all subslices separated by sep and returns a
|
||||
|
||||
Reference in New Issue
Block a user