Browse Source

privval: allow passing options to NewSignerDialerEndpoint (#5434) (#5437)

Required for #5291 to set timeouts for remote signers.
pull/5442/head
Erik Grinaker 4 years ago
committed by GitHub
parent
commit
6149f21cd6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions
  1. +2
    -0
      CHANGELOG_PENDING.md
  2. +5
    -0
      privval/signer_dialer_endpoint.go

+ 2
- 0
CHANGELOG_PENDING.md View File

@ -24,5 +24,7 @@ Friendly reminder, we have a [bug bounty program](https://hackerone.com/tendermi
- [config] \#5433 `statesync.rpc_servers` is now properly set when writing the configuration file (@erikgrinaker)
- [privval] \#5437 `NewSignerDialerEndpoint` can now be given `SignerServiceEndpointOption` (@erikgrinaker)
### BUG FIXES

+ 5
- 0
privval/signer_dialer_endpoint.go View File

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


Loading…
Cancel
Save