[sync] check last derivation in cache to avoid recomputation

This commit is contained in:
Riccardo Casatta 2020-11-16 12:06:48 +01:00
parent ac18fb119f
commit 4f99c77abe
No known key found for this signature in database
GPG Key ID: FD986A969E450397

View File

@ -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;