privval: add SignerDialerEndpointRetryWaitInterval option (#4115)

Added a small function to be able to change the default retry interval for the privval. The default is 100ms, this function allows to change to any time.Duration.

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>
This commit is contained in:
cosmostuba
2019-11-07 17:40:00 +04:00
committed by Anton Kaliaev
co-authored by Anton Kaliaev
parent 98c595312a
commit 4b15b96588
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -28,6 +28,7 @@ program](https://hackerone.com/tendermint).
- [libs/pubsub] [\#4070](https://github.com/tendermint/tendermint/pull/4070) Strip out non-numeric characters when attempting to match numeric values.
- [p2p] [\#3991](https://github.com/tendermint/tendermint/issues/3991) Log "has been established or dialed" as debug log instead of Error for connected peers (@whunmr)
- [rpc] [\#4077](https://github.com/tendermint/tendermint/pull/4077) Added support for `EXISTS` clause to the Websocket query interface.
- [privval] Add `SignerDialerEndpointRetryWaitInterval` option (@cosmostuba)
### BUG FIXES:
+5
View File
@@ -26,6 +26,11 @@ func SignerDialerEndpointConnRetries(retries int) SignerServiceEndpointOption {
return func(ss *SignerDialerEndpoint) { ss.maxConnRetries = retries }
}
// SignerDialerEndpointRetryWaitInterval sets the retry wait interval to a custom value
func SignerDialerEndpointRetryWaitInterval(interval time.Duration) SignerServiceEndpointOption {
return func(ss *SignerDialerEndpoint) { ss.retryWait = interval }
}
// SignerDialerEndpoint dials using its dialer and responds to any
// signature requests using its privVal.
type SignerDialerEndpoint struct {