pub struct FullScanRequest<K> {
    pub chain_tip: CheckPoint,
    pub tx_cache: TxCache,
    pub spks_by_keychain: BTreeMap<K, Box<dyn Iterator<Item = (u32, ScriptBuf)> + Send>>,
}
Expand description

Data required to perform a spk-based blockchain client full scan.

A client full scan iterates through all the scripts for the given keychains, fetching relevant data until some stop gap number of scripts is found that have no data. This operation is generally only used when importing or restoring previously used keychains in which the list of used scripts is not known. The full scan process also updates the chain from the given CheckPoint.

Fields§

§chain_tip: CheckPoint

A checkpoint for the current LocalChain::tip. The full scan process will return a new chain update that extends this tip.

§tx_cache: TxCache

Cache of full transactions, so the chain-source can avoid re-fetching.

§spks_by_keychain: BTreeMap<K, Box<dyn Iterator<Item = (u32, ScriptBuf)> + Send>>

Iterators of script pubkeys indexed by the keychain index.

Implementations§

Construct a new FullScanRequest from a given chain_tip.

Add to the TxCache held by the request.

This consumes the SyncRequest and returns the updated one.

Add all transactions from TxGraph into the TxCache.

This consumes the SyncRequest and returns the updated one.

Construct a new FullScanRequest from a given chain_tip and index.

Unbounded script pubkey iterators for each keychain (K) are extracted using KeychainTxOutIndex::all_unbounded_spk_iters and is used to populate the FullScanRequest.

Set the [Script]s for a given keychain.

This consumes the FullScanRequest and returns the updated one.

Chain on additional [Script]s that will be synced against.

This consumes the FullScanRequest and returns the updated one.

Add a closure that will be called for every [Script] previously added to any keychain in this request.

This consumes the SyncRequest and returns the updated one.

Add a closure that will be called for every [Script] previously added to a given keychain in this request.

This consumes the SyncRequest and returns the updated one.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.