|
|
@ -35,6 +35,26 @@ impl Command for SyncCommand { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct EncryptionStatusCommand {} |
|
|
|
|
|
|
|
impl Command for EncryptionStatusCommand { |
|
|
|
|
|
|
|
fn help(&self) -> String { |
|
|
|
|
|
|
|
let mut h = vec![]; |
|
|
|
|
|
|
|
h.push("Check if the wallet is encrypted and if it is locked"); |
|
|
|
|
|
|
|
h.push("Usage:"); |
|
|
|
|
|
|
|
h.push("encryptionstatus"); |
|
|
|
|
|
|
|
h.push(""); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
h.join("\n") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn short_help(&self) -> String { |
|
|
|
|
|
|
|
"Check if the wallet is encrypted and if it is locked".to_string() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn exec(&self, _args: &[&str], lightclient: &LightClient) -> String { |
|
|
|
|
|
|
|
lightclient.do_encryption_status().pretty(2) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
struct SyncStatusCommand {} |
|
|
|
struct SyncStatusCommand {} |
|
|
|
impl Command for SyncStatusCommand { |
|
|
|
impl Command for SyncStatusCommand { |
|
|
@ -733,6 +753,7 @@ pub fn get_commands() -> Box<HashMap<String, Box<dyn Command>>> { |
|
|
|
|
|
|
|
|
|
|
|
map.insert("sync".to_string(), Box::new(SyncCommand{})); |
|
|
|
map.insert("sync".to_string(), Box::new(SyncCommand{})); |
|
|
|
map.insert("syncstatus".to_string(), Box::new(SyncStatusCommand{})); |
|
|
|
map.insert("syncstatus".to_string(), Box::new(SyncStatusCommand{})); |
|
|
|
|
|
|
|
map.insert("encryptionstatus".to_string(), Box::new(EncryptionStatusCommand{})); |
|
|
|
map.insert("rescan".to_string(), Box::new(RescanCommand{})); |
|
|
|
map.insert("rescan".to_string(), Box::new(RescanCommand{})); |
|
|
|
map.insert("help".to_string(), Box::new(HelpCommand{})); |
|
|
|
map.insert("help".to_string(), Box::new(HelpCommand{})); |
|
|
|
map.insert("balance".to_string(), Box::new(BalanceCommand{})); |
|
|
|
map.insert("balance".to_string(), Box::new(BalanceCommand{})); |
|
|
|