diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 96f794c77..2235fc63b 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -22,5 +22,7 @@ Friendly reminder, we have a [bug bounty program](https://hackerone.com/tendermi ### IMPROVEMENTS +- [privval] `NewSignerDialerEndpoint` can now be given `SignerServiceEndpointOption` (@erikgrinaker) + ### BUG FIXES diff --git a/privval/signer_dialer_endpoint.go b/privval/signer_dialer_endpoint.go index 7336f64be..bd98314b6 100644 --- a/privval/signer_dialer_endpoint.go +++ b/privval/signer_dialer_endpoint.go @@ -48,6 +48,7 @@ type SignerDialerEndpoint struct { func NewSignerDialerEndpoint( logger log.Logger, dialer SocketDialer, + options ...SignerServiceEndpointOption, ) *SignerDialerEndpoint { sd := &SignerDialerEndpoint{ @@ -56,6 +57,10 @@ func NewSignerDialerEndpoint( maxConnRetries: defaultMaxDialRetries, } + for _, optionFunc := range options { + optionFunc(sd) + } + sd.BaseService = *service.NewBaseService(logger, "SignerDialerEndpoint", sd) sd.signerEndpoint.timeoutReadWrite = defaultTimeoutReadWriteSeconds * time.Second