From ae67c39c8a79827fc0aeeddf86f64bdbf193cbf4 Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Thu, 14 Mar 2024 11:23:10 +0900 Subject: [PATCH] fix: remove unnecessary condition (#766) * 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> --- privval/signer_listener_endpoint.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/privval/signer_listener_endpoint.go b/privval/signer_listener_endpoint.go index 44b3a3c37..cfd272f07 100644 --- a/privval/signer_listener_endpoint.go +++ b/privval/signer_listener_endpoint.go @@ -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" @@ -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 }