From 4f99c77abee714e6c4e5b7182d8d06531a6d74d7 Mon Sep 17 00:00:00 2001 From: Riccardo Casatta Date: Mon, 16 Nov 2020 12:06:48 +0100 Subject: [PATCH] [sync] check last derivation in cache to avoid recomputation --- src/wallet/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/mod.rs b/src/wallet/mod.rs index 79ce7789..94c5a122 100644 --- a/src/wallet/mod.rs +++ b/src/wallet/mod.rs @@ -1268,7 +1268,7 @@ where if self .database .borrow() - .get_script_pubkey_from_path(ScriptType::External, max_address)? + .get_script_pubkey_from_path(ScriptType::External, max_address.saturating_sub(1))? .is_none() { run_setup = true;