kaspa_cli_lib/modules/
stop.rs

1use crate::imports::*;
2
3#[derive(Default, Handler)]
4#[help("Stop local node and close wallet")]
5pub struct Stop;
6
7impl Stop {
8    async fn main(self: Arc<Self>, ctx: &Arc<dyn Context>, _argv: Vec<String>, _cmd: &str) -> Result<()> {
9        ctx.term().exec("wallet close").await?;
10        ctx.term().exec("disconnect").await?;
11        ctx.term().exec("node stop").await?;
12
13        Ok(())
14    }
15}