zcash_client_backend: Fix `scan_cached_blocks` example doc compilation errors.
This commit is contained in:
parent
d80782a739
commit
2ba89a6d16
|
@ -58,9 +58,12 @@
|
||||||
//! // the first element of the vector of suggested ranges.
|
//! // the first element of the vector of suggested ranges.
|
||||||
//! match scan_ranges.first() {
|
//! match scan_ranges.first() {
|
||||||
//! Some(scan_range) if scan_range.priority() == ScanPriority::Verify => {
|
//! Some(scan_range) if scan_range.priority() == ScanPriority::Verify => {
|
||||||
|
//! // Download the chain state for the block prior to the start of the range you want
|
||||||
|
//! // to scan.
|
||||||
|
//! let chain_state = unimplemented!("get_chain_state(scan_range.block_range().start - 1)?;");
|
||||||
//! // Download the blocks in `scan_range` into the block source, overwriting any
|
//! // Download the blocks in `scan_range` into the block source, overwriting any
|
||||||
//! // existing blocks in this range.
|
//! // existing blocks in this range.
|
||||||
//! unimplemented!();
|
//! unimplemented!("cache_blocks(scan_range)?;");
|
||||||
//!
|
//!
|
||||||
//! // Scan the downloaded blocks
|
//! // Scan the downloaded blocks
|
||||||
//! let scan_result = scan_cached_blocks(
|
//! let scan_result = scan_cached_blocks(
|
||||||
|
@ -68,6 +71,7 @@
|
||||||
//! &block_source,
|
//! &block_source,
|
||||||
//! &mut wallet_db,
|
//! &mut wallet_db,
|
||||||
//! scan_range.block_range().start,
|
//! scan_range.block_range().start,
|
||||||
|
//! chain_state,
|
||||||
//! scan_range.len()
|
//! scan_range.len()
|
||||||
//! );
|
//! );
|
||||||
//!
|
//!
|
||||||
|
@ -118,6 +122,9 @@
|
||||||
//! // encountered, this process should be repeated starting at step (3).
|
//! // encountered, this process should be repeated starting at step (3).
|
||||||
//! let scan_ranges = wallet_db.suggest_scan_ranges().map_err(Error::Wallet)?;
|
//! let scan_ranges = wallet_db.suggest_scan_ranges().map_err(Error::Wallet)?;
|
||||||
//! for scan_range in scan_ranges {
|
//! for scan_range in scan_ranges {
|
||||||
|
//! // Download the chain state for the block prior to the start of the range you want
|
||||||
|
//! // to scan.
|
||||||
|
//! let chain_state = unimplemented!("get_chain_state(scan_range.block_range().start - 1)?;");
|
||||||
//! // Download the blocks in `scan_range` into the block source. While in this example this
|
//! // Download the blocks in `scan_range` into the block source. While in this example this
|
||||||
//! // step is performed in-line, it's fine for the download of scan ranges to be asynchronous
|
//! // step is performed in-line, it's fine for the download of scan ranges to be asynchronous
|
||||||
//! // and for the scanner to process the downloaded ranges as they become available in a
|
//! // and for the scanner to process the downloaded ranges as they become available in a
|
||||||
|
@ -125,7 +132,7 @@
|
||||||
//! // appropriate, and for ranges with priority `Historic` it can be useful to download and
|
//! // appropriate, and for ranges with priority `Historic` it can be useful to download and
|
||||||
//! // scan the range in reverse order (to discover more recent unspent notes sooner), or from
|
//! // scan the range in reverse order (to discover more recent unspent notes sooner), or from
|
||||||
//! // the start and end of the range inwards.
|
//! // the start and end of the range inwards.
|
||||||
//! unimplemented!();
|
//! unimplemented!("cache_blocks(scan_range)?;");
|
||||||
//!
|
//!
|
||||||
//! // Scan the downloaded blocks.
|
//! // Scan the downloaded blocks.
|
||||||
//! let scan_result = scan_cached_blocks(
|
//! let scan_result = scan_cached_blocks(
|
||||||
|
@ -133,6 +140,7 @@
|
||||||
//! &block_source,
|
//! &block_source,
|
||||||
//! &mut wallet_db,
|
//! &mut wallet_db,
|
||||||
//! scan_range.block_range().start,
|
//! scan_range.block_range().start,
|
||||||
|
//! chain_state,
|
||||||
//! scan_range.len()
|
//! scan_range.len()
|
||||||
//! )?;
|
//! )?;
|
||||||
//!
|
//!
|
||||||
|
|
Loading…
Reference in New Issue