Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverbundalo committed Mar 12, 2024
1 parent 6ff4220 commit a8d32b6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion e2e-polybft/e2e/jsonrpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestE2E_JsonRPC(t *testing.T) {

cluster := framework.NewTestCluster(t, 4,
framework.WithPremine(types.Address(acct.Address())),
// framework.WithHttps("/etc/ssl/certs/ssl-cert-snakeoil.pem", "/etc/ssl/private/ssl-cert-snakeoil.key"),
// framework.WithHTTPS("/etc/ssl/certs/ssl-cert-snakeoil.pem", "/etc/ssl/private/ssl-cert-snakeoil.key"),
)
defer cluster.Stop()

Expand Down
2 changes: 1 addition & 1 deletion e2e-polybft/framework/test-cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ func WithPredeploy(predeployString string) ClusterOption {
}
}

func WithHttps(certFile string, keyFile string) ClusterOption {
func WithHTTPS(certFile string, keyFile string) ClusterOption {
return func(h *TestClusterConfig) {
h.TLSCertFile = certFile
h.TLSKeyFile = keyFile
Expand Down
1 change: 1 addition & 0 deletions e2e-polybft/framework/test-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func (t *TestServer) GrpcAddr() string {
func (t *TestServer) JSONRPCAddr() string {
if t.config.TLSCertFile != "" && t.config.TLSKeyFile != "" {
host, _ := os.Hostname()

return fmt.Sprintf("https://%s:%d", host, t.config.JSONRPCPort)
} else {
return fmt.Sprintf("http://%s:%d", hostIP, t.config.JSONRPCPort)
Expand Down
1 change: 1 addition & 0 deletions jsonrpc/jsonrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ func (j *JSONRPC) setupHTTP() error {
if j.config.TLSCertFile != "" && j.config.TLSKeyFile != "" {
j.logger.Info("https cert file", j.config.TLSCertFile)
j.logger.Info("https key file", j.config.TLSKeyFile)

go func() {
if err := srv.ServeTLS(lis, j.config.TLSCertFile, j.config.TLSKeyFile); err != nil {
j.logger.Error("closed https connection", "err", err)
Expand Down

0 comments on commit a8d32b6

Please sign in to comment.