Skip to content

Commit

Permalink
privval: allow passing options to NewSignerDialerEndpoint (#5434)
Browse files Browse the repository at this point in the history
Required for #5291 to set timeouts for remote signers.
  • Loading branch information
erikgrinaker committed Oct 1, 2020
1 parent e0f686c commit 44d2c00
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,7 @@ Friendly reminder, we have a [bug bounty program](https://hackerone.com/tendermi

### IMPROVEMENTS

- [privval] \#5437 `NewSignerDialerEndpoint` can now be given `SignerServiceEndpointOption` (@erikgrinaker)

### BUG FIXES

5 changes: 5 additions & 0 deletions privval/signer_dialer_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ type SignerDialerEndpoint struct {
func NewSignerDialerEndpoint(
logger log.Logger,
dialer SocketDialer,
options ...SignerServiceEndpointOption,
) *SignerDialerEndpoint {

sd := &SignerDialerEndpoint{
Expand All @@ -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

Expand Down

0 comments on commit 44d2c00

Please sign in to comment.