Function scan_height_and_store_results

Source
pub async fn scan_height_and_store_results(
    height: Height,
    state: State,
    chain_tip_change: Option<ChainTipChange>,
    storage: Storage,
    key_last_scanned_heights: Arc<HashMap<SaplingScanningKey, Height>>,
    parsed_keys: HashMap<String, DiversifiableFullViewingKey>,
    subscribed_keys_receiver: Receiver<Arc<HashMap<String, Sender<ScanResult>>>>,
) -> Result<Option<Height>, Report>
Expand description

Get the block at height from state, scan it with the keys in parsed_keys, and store the results in storage. If height is lower than the key_birthdays for that key, skip it.

Returns:

  • Ok(Some(height)) if the height was scanned,
  • Ok(None) if the height was not in the state, and
  • Err(error) on fatal errors.