Skip to content

Commit eb622bc

Browse files
committed
Remove configuration reload action in cardano-rpc server startup
1 parent a7bd74d commit eb622bc

1 file changed

Lines changed: 10 additions & 16 deletions

File tree

cardano-rpc/src/Cardano/Rpc/Server.hs

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,17 @@ methodsUtxoRpcSubmit =
6666

6767
runRpcServer
6868
:: Tracer IO TraceRpc
69-
-> IO (RpcConfig, NetworkMagic)
70-
-- ^ action which reloads RPC configuration
69+
-> (RpcConfig, NetworkMagic)
7170
-> IO ()
72-
runRpcServer tracer loadRpcConfig = handleFatalExceptions $ do
73-
( rpcConfig@RpcConfig
74-
{ isEnabled = Identity isEnabled
75-
, rpcSocketPath = Identity (File rpcSocketPathFp)
76-
, nodeSocketPath = Identity nodeSocketPath
77-
}
78-
, networkMagic
79-
) <-
80-
loadRpcConfig
81-
let config =
71+
runRpcServer tracer rpcConfig = handleFatalExceptions $ do
72+
let ( RpcConfig
73+
{ isEnabled = Identity isEnabled
74+
, rpcSocketPath = Identity (File rpcSocketPathFp)
75+
, nodeSocketPath = Identity nodeSocketPath
76+
}
77+
, networkMagic
78+
) = rpcConfig
79+
config =
8280
ServerConfig
8381
{ serverInsecure = Just $ InsecureUnix rpcSocketPathFp
8482
, serverSecure = Nothing
@@ -90,10 +88,6 @@ runRpcServer tracer loadRpcConfig = handleFatalExceptions $ do
9088
, rpcLocalNodeConnectInfo = mkLocalNodeConnectInfo nodeSocketPath networkMagic
9189
}
9290

93-
-- TODO this is logged by node configuration already, so it would make sense to log it again when
94-
-- configuration gets reloaded
95-
-- traceWith tracer $ "RPC configuration: " <> show rpcConfig
96-
9791
when isEnabled $
9892
runRIO rpcEnv $
9993
withRunInIO $ \runInIO ->

0 commit comments

Comments
 (0)