From 996fea70ac57bec2b90f555aca0c068532fe2940 Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Wed, 20 Sep 2023 12:39:36 -0600 Subject: [PATCH] zcash_client_backend: Add detail to documentation of `suggest_scan_ranges` Fixes #971 --- zcash_client_backend/src/data_api.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zcash_client_backend/src/data_api.rs b/zcash_client_backend/src/data_api.rs index 86cf4c4e3..e50fac38c 100644 --- a/zcash_client_backend/src/data_api.rs +++ b/zcash_client_backend/src/data_api.rs @@ -257,7 +257,11 @@ pub trait WalletRead { /// tree size information for each block; or else the scan is likely to fail if notes belonging /// to the wallet are detected. /// - /// The returned range(s) may include block heights beyond the current chain tip. + /// The returned range(s) may include block heights beyond the current chain tip. Ranges are + /// returned in order of descending priority, and higher-priority ranges should always be + /// scanned before lower-priority ranges; in particular, ranges with [`ScanPriority::Verify`] + /// priority must always be scanned first in order to avoid blockchain continuity errors in the + /// case of a reorg. /// /// [`CompactBlock`]: crate::proto::compact_formats::CompactBlock fn suggest_scan_ranges(&self) -> Result, Self::Error>;