From 12b9ef24bde467e1f07b144a2984b470e24b3f25 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Sat, 13 Apr 2024 17:21:07 +0300 Subject: [PATCH] Allow executing generate_diagnostic_data through execute_command --- libs/sdk-core/src/greenlight/node_api.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libs/sdk-core/src/greenlight/node_api.rs b/libs/sdk-core/src/greenlight/node_api.rs index 64bfe65a4..401153a39 100644 --- a/libs/sdk-core/src/greenlight/node_api.rs +++ b/libs/sdk-core/src/greenlight/node_api.rs @@ -1479,6 +1479,10 @@ impl NodeAPI for Greenlight { .into_inner(); Ok(format!("{resp:?}")) } + NodeCommand::GenerateDiagnosticData => { + let resp = self.generate_diagnostic_data().await?; + Ok(format!("{resp:?}")) + } NodeCommand::Stop => { let resp = self .get_node_client() @@ -1646,6 +1650,10 @@ impl NodeAPI for Greenlight { #[derive(Clone, PartialEq, Eq, Debug, EnumString, Display, Deserialize, Serialize)] enum NodeCommand { + /// Generates diagnostic data report. + #[strum(serialize = "generatediagnosticdata")] + GenerateDiagnosticData, + /// Closes all channels of all peers. #[strum(serialize = "closeallchannels")] CloseAllChannels,