Release/v0.32.11 (#4709)

* privval: retry GetPubKey, SignVote/Proposal indefinitely

Fixes #4275
This commit is contained in:
Anton Kaliaev
2020-04-29 19:25:27 +04:00
committed by GitHub
parent eab4d6d82b
commit d85e2e52d2
6 changed files with 101 additions and 6 deletions

View File

@@ -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