Upgrade go-nitro and add support for remote Nitro node #258

Merged
ashwin merged 10 commits from deep-stack/ipld-eth-server:pm-external-nitro-node into payments 2023-10-18 08:15:36 +00:00
Showing only changes of commit 88ccedda33 - Show all commits

View File

@ -113,12 +113,15 @@ func serve() {
// TODO: Read from config file
rpcPort := 4005
tlsCertFilepath := "./nitroTLS/statechannels.org.pem"
tlsKeyFilepath := "./nitroTLS/statechannels.org_key.pem"
tlsCertFilepath := ""
tlsKeyFilepath := ""
cert, err := tls.LoadX509KeyPair(tlsCertFilepath, tlsKeyFilepath)
if err != nil {
logWithCommand.Fatal(err)
var cert tls.Certificate
if tlsCertFilepath != "" && tlsKeyFilepath != "" {
cert, err = tls.LoadX509KeyPair(tlsCertFilepath, tlsKeyFilepath)
if err != nil {
logWithCommand.Fatal(err)
}
}
nitroRpcServer, err := initNitroRpcServer(nitroNode, pm, &cert, rpcPort)