Merge pull request #5819 from ebfull/fix-rescans

Fix logic for deciding whether to perform Orchard updates during rescan
This commit is contained in:
str4d 2022-04-05 14:53:17 +01:00 committed by GitHub
commit 9e80e4aff6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -4399,7 +4399,7 @@ int CWallet::ScanForWalletTransactions(
throw std::runtime_error("CWallet::ScanForWalletTransactions(): Orchard wallet is out of sync. Please restart your node with -rescan.");
}
}
} else if (isInitScan && pindex->nHeight < nu5_height) {
} else if (isInitScan && pindexStart->nHeight < nu5_height) {
// If it's the initial scan and we're starting below the nu5 activation
// height, we're effectively rescanning from genesis and so it's safe
// to update the note commitment tree as we progress.