From: Riccardo Casatta Date: Mon, 16 Nov 2020 11:06:48 +0000 (+0100) Subject: [sync] check last derivation in cache to avoid recomputation X-Git-Tag: v0.2.0~65^2~15 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/encoding-error.html?a=commitdiff_plain;h=4f99c77abee714e6c4e5b7182d8d06531a6d74d7;p=bdk [sync] check last derivation in cache to avoid recomputation --- 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;