Upgrade go-nitro and add support for remote Nitro node #258
13
cmd/serve.go
13
cmd/serve.go
@ -113,12 +113,15 @@ func serve() {
|
|||||||
|
|
||||||
// TODO: Read from config file
|
// TODO: Read from config file
|
||||||
rpcPort := 4005
|
rpcPort := 4005
|
||||||
tlsCertFilepath := "./nitroTLS/statechannels.org.pem"
|
tlsCertFilepath := ""
|
||||||
tlsKeyFilepath := "./nitroTLS/statechannels.org_key.pem"
|
tlsKeyFilepath := ""
|
||||||
|
|
||||||
cert, err := tls.LoadX509KeyPair(tlsCertFilepath, tlsKeyFilepath)
|
var cert tls.Certificate
|
||||||
if err != nil {
|
if tlsCertFilepath != "" && tlsKeyFilepath != "" {
|
||||||
logWithCommand.Fatal(err)
|
cert, err = tls.LoadX509KeyPair(tlsCertFilepath, tlsKeyFilepath)
|
||||||
|
if err != nil {
|
||||||
|
logWithCommand.Fatal(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nitroRpcServer, err := initNitroRpcServer(nitroNode, pm, &cert, rpcPort)
|
nitroRpcServer, err := initNitroRpcServer(nitroNode, pm, &cert, rpcPort)
|
||||||
|
Loading…
Reference in New Issue
Block a user