Skip to content

Commit

Permalink
Remove unnecessary condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ulbqb committed Mar 11, 2024
1 parent 898b48c commit 301d330
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions privval/signer_listener_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package privval

import (
"fmt"
"github.com/Finschia/ostracon/privval/internal"
"net"
"time"

"github.com/Finschia/ostracon/privval/internal"

privvalproto "github.com/tendermint/tendermint/proto/tendermint/privval"

"github.com/Finschia/ostracon/libs/log"
Expand All @@ -29,7 +30,7 @@ func SignerListenerEndpointTimeoutReadWrite(timeout time.Duration) SignerListene
// connections from the only allowed addresses
func SignerListenerEndpointAllowAddress(protocol string, allowedAddresses []string) SignerListenerEndpointOption {
return func(sl *SignerListenerEndpoint) {
if protocol == "tcp" || len(protocol) == 0 {
if protocol == "tcp" {
sl.connFilter = internal.NewIpFilter(allowedAddresses, sl.Logger)
return
}
Expand Down

0 comments on commit 301d330

Please sign in to comment.