Upgrade go-nitro and add support for remote Nitro node #258
@ -113,13 +113,16 @@ 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 tlsCertFilepath != "" && tlsKeyFilepath != "" {
|
||||||
|
cert, err = tls.LoadX509KeyPair(tlsCertFilepath, tlsKeyFilepath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logWithCommand.Fatal(err)
|
logWithCommand.Fatal(err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
nitroRpcServer, err := initNitroRpcServer(nitroNode, pm, &cert, rpcPort)
|
nitroRpcServer, err := initNitroRpcServer(nitroNode, pm, &cert, rpcPort)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user