From 6ef448e6d69d877127ac79f5c7ae55710d4b1f9c Mon Sep 17 00:00:00 2001 From: IAvecilla Date: Fri, 16 Feb 2024 10:27:49 -0300 Subject: [PATCH] Fix missing documentation --- node/tests/src/main.rs | 3 +++ node/tools/src/config.rs | 1 + node/tools/src/rpc/methods/config.rs | 1 + 3 files changed, 5 insertions(+) diff --git a/node/tests/src/main.rs b/node/tests/src/main.rs index 04f2c801..72b56f05 100644 --- a/node/tests/src/main.rs +++ b/node/tests/src/main.rs @@ -28,6 +28,8 @@ enum TesterCommands { Run, } +/// Get the path of the node ips config file. +/// This way we can run the test from every directory and also inside kubernetes pod. fn get_config_path() -> String { // This way we can run the test from every directory and also inside kubernetes pod. let manifest_path = std::env::var("CARGO_MANIFEST_DIR"); @@ -54,6 +56,7 @@ pub async fn generate_config() { } } +/// Start the tests pod in the kubernetes cluster. pub async fn start_tests_pod() { let client = k8s::get_client().await.unwrap(); k8s::create_tests_deployment(&client).await.unwrap(); diff --git a/node/tools/src/config.rs b/node/tools/src/config.rs index 69b603ed..b81960f4 100644 --- a/node/tools/src/config.rs +++ b/node/tools/src/config.rs @@ -34,6 +34,7 @@ pub(crate) fn encode_json(x: &T) -> String { encode_with_serializer(x, s) } +/// Encodes a generated proto message to json for arbitrary ProtoFmt with a custom serializer. pub(crate) fn encode_with_serializer( x: &T, mut serializer: Serializer, F>, diff --git a/node/tools/src/rpc/methods/config.rs b/node/tools/src/rpc/methods/config.rs index 0d22ec4d..20094dd6 100644 --- a/node/tools/src/rpc/methods/config.rs +++ b/node/tools/src/rpc/methods/config.rs @@ -12,6 +12,7 @@ pub(crate) struct ConfigInfo; // RPCMethod trait should be more general to allow external parameters like this case // TODO fix the trait and implement this code in it impl ConfigInfo { + /// Returns the config of the node, this reads the config.json file so does not support live updates. pub(crate) fn info(config: AppConfig) -> Result { // This may change in the future since we are assuming that the executor binary is being run inside the config directory. Ok(serde_json::json!({