Skip to content

Commit

Permalink
Allow executing generate_diagnostic_data through execute_command
Browse files Browse the repository at this point in the history
  • Loading branch information
erdemyerebasmaz committed Apr 15, 2024
1 parent 2c17ea8 commit 12b9ef2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libs/sdk-core/src/greenlight/node_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 12b9ef2

Please sign in to comment.