Handle review changes
This commit is contained in:
parent
71c028435d
commit
f2f951f7b8
13
cmd/serve.go
13
cmd/serve.go
@ -113,7 +113,6 @@ func serve() {
|
||||
pm.Start(wg)
|
||||
defer pm.Stop()
|
||||
|
||||
rpcPort := nitroConfig.InProcessNode.RpcPort
|
||||
tlsCertFilepath := nitroConfig.InProcessNode.TlsCertFilepath
|
||||
tlsKeyFilepath := nitroConfig.InProcessNode.TlsKeyFilepath
|
||||
|
||||
@ -125,7 +124,7 @@ func serve() {
|
||||
}
|
||||
}
|
||||
|
||||
nitroRpcServer, err := initNitroRpcServer(nitroNode, pm, cert, rpcPort)
|
||||
nitroRpcServer, err := initNitroRpcServer(nitroNode, pm, cert, nitroConfig.InProcessNode.RpcPort)
|
||||
if err != nil {
|
||||
logWithCommand.Fatal(err)
|
||||
}
|
||||
@ -513,18 +512,24 @@ func initNitroRpcServer(node *nitroNode.Node, pm paymentsmanager.PaymentsManager
|
||||
}
|
||||
|
||||
func readRpcQueryRates(filepath string) (map[string]*big.Int, error) {
|
||||
result := make(map[string]*big.Int)
|
||||
|
||||
if filepath == "" {
|
||||
logWithCommand.Warn("RPC query rates file path not provided")
|
||||
return result, nil
|
||||
}
|
||||
|
||||
jsonFile, err := os.Open(filepath)
|
||||
defer jsonFile.Close()
|
||||
|
||||
if err != nil {
|
||||
if errors.Is(err, fs.ErrNotExist) {
|
||||
result := make(map[string]*big.Int)
|
||||
logWithCommand.Warn("RPC query rates file does not exist")
|
||||
return result, nil
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var result map[string]*big.Int
|
||||
decoder := json.NewDecoder(jsonFile)
|
||||
err = decoder.Decode(&result)
|
||||
if err != nil {
|
||||
|
@ -45,12 +45,12 @@
|
||||
caAddress = "" # NITRO_CA_ADDRESS
|
||||
useDurableStore = true # NITRO_USE_DURABLE_STORE
|
||||
durableStoreFolder = "./data/nitronode" # NITRO_DURABLE_STORE_FOLDER
|
||||
msgPort = 3005
|
||||
rpcPort = 4005
|
||||
wsMsgPort = 5005
|
||||
chainStartBlock = 0
|
||||
tlsCertFilepath = ""
|
||||
tlsKeyFilepath = ""
|
||||
msgPort = 3005 # NITRO_MSG_PORT
|
||||
rpcPort = 4005 # NITRO_RPC_PORT
|
||||
wsMsgPort = 5005 # NITRO_WS_MSG_PORT
|
||||
chainStartBlock = 0 # NITRO_CHAIN_START_BLOCK
|
||||
tlsCertFilepath = "" # NITRO_TLS_CERT_FILEPATH
|
||||
tlsKeyFilepath = "" # NITRO_TLS_KEY_FILEPATH
|
||||
|
||||
[nitro.remoteNode]
|
||||
nitroEndpoint = "127.0.0.1:4005/api/v1" # NITRO_ENDPOINT
|
||||
|
Loading…
Reference in New Issue
Block a user