(
plugin: Plugin<()>,
args: serde_json::Value,
)
| 96 | } |
| 97 | |
| 98 | async fn setconfig_callback( |
| 99 | plugin: Plugin<()>, |
| 100 | args: serde_json::Value, |
| 101 | ) -> Result<serde_json::Value, Error> { |
| 102 | let name = args.get("config").unwrap().as_str().unwrap(); |
| 103 | let value = args.get("val").unwrap(); |
| 104 | |
| 105 | let opt_value = options::Value::String(value.to_string()); |
| 106 | |
| 107 | plugin.set_option_str(name, opt_value)?; |
| 108 | log::info!( |
| 109 | "cln-plugin-startup: Got dynamic option change: {} {}", |
| 110 | name, |
| 111 | plugin.option_str(name).unwrap().unwrap().as_str().unwrap() |
| 112 | ); |
| 113 | Ok(json!({})) |
| 114 | } |
| 115 | |
| 116 | async fn testoptions(p: Plugin<()>, _v: serde_json::Value) -> Result<serde_json::Value, Error> { |
| 117 | let test_option = p.option(&TEST_OPTION)?; |
no test coverage detected