From 37cb3a99f7e5f77f9f6e957620a33402154cce9e Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Thu, 1 Oct 2020 16:40:48 +0200 Subject: [PATCH] dont force to resync at import --- lib/src/commands.rs | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/lib/src/commands.rs b/lib/src/commands.rs index 3d853fa..33d4d75 100644 --- a/lib/src/commands.rs +++ b/lib/src/commands.rs @@ -674,29 +674,11 @@ impl Command for ImportCommand { let key = args[0]; - - let rescan = if args.len() == 3 { - if args[2] == "norescan" || args[2] == "false" || args[2] == "no" { - false - } else { - return format!("Couldn't undestand the argument '{}'. Please pass 'norescan' to prevent rescanning the wallet", args[2]); - } - } else { - true - }; - let r = match lightclient.do_import_key(key.to_string(), 0) { Ok(r) => r.pretty(2), Err(e) => return format!("Error: {}", e), }; - if rescan { - match lightclient.do_rescan() { - Ok(_) => {}, - Err(e) => return format!("Error: Rescan failed: {}", e), - }; - } - return r; } } @@ -727,12 +709,6 @@ impl Command for TImportCommand { Err(e) => return format!("Error: {}", e), }; - match lightclient.do_rescan() { - Ok(_) => {}, - Err(e) => return format!("Error: Rescan failed: {}", e), - }; - - return r; } }