Skip to content

Commit

Permalink
fix: remove unnecessary condition (#766)
Browse files Browse the repository at this point in the history
* Remove unnecessary condition

* Update privval/signer_listener_endpoint.go

Co-authored-by: murogari <55307968+Mdaiki0730@users.noreply.github.com>

---------

Co-authored-by: murogari <55307968+Mdaiki0730@users.noreply.github.com>
  • Loading branch information
ulbqb and Mdaiki0730 committed Mar 14, 2024
1 parent 1f5fb66 commit ae67c39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions privval/signer_listener_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package privval

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

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

"github.com/Finschia/ostracon/libs/log"
"github.com/Finschia/ostracon/privval/internal"
"github.com/Finschia/ostracon/libs/service"
tmsync "github.com/Finschia/ostracon/libs/sync"
ocprivvalproto "github.com/Finschia/ostracon/proto/ostracon/privval"
Expand All @@ -29,7 +29,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 ae67c39

Please sign in to comment.