@@ -77,28 +77,28 @@ func StartTestOrderflowProxy(name string) (*OrderflowProxyTestSetup, error) {
7777 localBuilderServer := ServeHTTPRequestToChan (localBuilderRequests )
7878
7979 proxy := createProxy (localBuilderServer .URL , name )
80- publicProxyServer := & http.Server {
80+ publicProxyServer := & http.Server { //nolint:gosec
8181 Handler : proxy .PublicHandler ,
8282 TLSConfig : proxy .TLSConfig (),
8383 }
84- publicListener , err := net .Listen ("tcp" , ":0" )
84+ publicListener , err := net .Listen ("tcp" , ":0" ) //nolint:gosec
8585 if err != nil {
8686 return nil , err
8787 }
88- go publicProxyServer .ServeTLS (publicListener , "" , "" ) //nolint: errcheck
89- publicServerEndpoint := fmt .Sprintf ("https://localhost:%d" , publicListener .Addr ().(* net.TCPAddr ).Port )
90- ip := fmt .Sprintf ("127.0.0.1:%d" , publicListener .Addr ().(* net.TCPAddr ).Port )
88+ go publicProxyServer .ServeTLS (publicListener , "" , "" ) //nolint: errcheck
89+ publicServerEndpoint := fmt .Sprintf ("https://localhost:%d" , publicListener .Addr ().(* net.TCPAddr ).Port ) //nolint:forcetypeassert
90+ ip := fmt .Sprintf ("127.0.0.1:%d" , publicListener .Addr ().(* net.TCPAddr ).Port ) //nolint:forcetypeassert
9191
92- localProxyServer := & http.Server {
92+ localProxyServer := & http.Server { //nolint:gosec
9393 Handler : proxy .LocalHandler ,
9494 TLSConfig : proxy .TLSConfig (),
9595 }
96- localListener , err := net .Listen ("tcp" , ":0" )
96+ localListener , err := net .Listen ("tcp" , ":0" ) //nolint:gosec
9797 if err != nil {
9898 return nil , err
9999 }
100- go localProxyServer .ServeTLS (localListener , "" , "" ) //nolint:errcheck
101- localServerEndpoint := fmt .Sprintf ("https://localhost:%d" , localListener .Addr ().(* net.TCPAddr ).Port )
100+ go localProxyServer .ServeTLS (localListener , "" , "" ) //nolint:errcheck
101+ localServerEndpoint := fmt .Sprintf ("https://localhost:%d" , localListener .Addr ().(* net.TCPAddr ).Port ) //nolint:forcetypeassert
102102
103103 certProxyServer := httptest .NewServer (proxy .CertHandler )
104104
@@ -160,7 +160,7 @@ func TestMain(m *testing.M) {
160160 archiveServer = ServeHTTPRequestToChan (archiveServerRequests )
161161 defer archiveServer .Close ()
162162
163- for i := 0 ; i < 3 ; i ++ {
163+ for i := range 3 {
164164 proxy , err := StartTestOrderflowProxy (fmt .Sprintf ("proxy:%d" , i ))
165165 proxies = append (proxies , proxy )
166166 if err != nil {
@@ -233,6 +233,7 @@ func expectNoRequest(t *testing.T, ch chan *RequestData) {
233233}
234234
235235func proxiesUpdatePeers (t * testing.T ) {
236+ t .Helper ()
236237 for _ , instance := range proxies {
237238 err := instance .proxy .RequestNewPeers ()
238239 require .NoError (t , err )
0 commit comments