Struct bdk::blockchain::compact_filters::CompactFiltersBlockchain
source · [−]pub struct CompactFiltersBlockchain { /* private fields */ }
compact_filters
only.Expand description
Structure implementing the required blockchain traits
Example
See the blockchain::compact_filters
module for a usage example.
Implementations
sourceimpl CompactFiltersBlockchain
impl CompactFiltersBlockchain
sourcepub fn new<P: AsRef<Path>>(
peers: Vec<Peer>,
storage_dir: P,
skip_blocks: Option<usize>
) -> Result<Self, CompactFiltersError>
pub fn new<P: AsRef<Path>>(
peers: Vec<Peer>,
storage_dir: P,
skip_blocks: Option<usize>
) -> Result<Self, CompactFiltersError>
Construct a new instance given a list of peers, a path to store headers and block filters downloaded during the sync and optionally a number of blocks to ignore starting from the genesis while scanning for the wallet’s outputs.
For each Peer
specified a new thread will be spawned to download and verify the filters
in parallel. It’s currently recommended to only connect to a single peer to avoid
inconsistencies in the data returned, optionally with multiple connections in parallel to
speed-up the sync process.
Trait Implementations
sourceimpl Blockchain for CompactFiltersBlockchain
impl Blockchain for CompactFiltersBlockchain
sourcefn get_capabilities(&self) -> HashSet<Capability>
fn get_capabilities(&self) -> HashSet<Capability>
Return the set of Capability
supported by this backend
sourceimpl ConfigurableBlockchain for CompactFiltersBlockchain
impl ConfigurableBlockchain for CompactFiltersBlockchain
type Config = CompactFiltersBlockchainConfig
type Config = CompactFiltersBlockchainConfig
Type that contains the configuration
sourcefn from_config(config: &Self::Config) -> Result<Self, Error>
fn from_config(config: &Self::Config) -> Result<Self, Error>
Create a new instance given a configuration
sourceimpl Debug for CompactFiltersBlockchain
impl Debug for CompactFiltersBlockchain
sourceimpl From<CompactFiltersBlockchain> for AnyBlockchain
impl From<CompactFiltersBlockchain> for AnyBlockchain
sourcefn from(inner: CompactFiltersBlockchain) -> Self
fn from(inner: CompactFiltersBlockchain) -> Self
Converts to this type from the input type.
sourceimpl GetHeight for CompactFiltersBlockchain
impl GetHeight for CompactFiltersBlockchain
sourcefn get_height(&self) -> Result<u32, Error>
fn get_height(&self) -> Result<u32, Error>
Return the current height
sourceimpl GetTx for CompactFiltersBlockchain
impl GetTx for CompactFiltersBlockchain
sourceimpl WalletSync for CompactFiltersBlockchain
impl WalletSync for CompactFiltersBlockchain
sourcefn wallet_setup<D: BatchDatabase>(
&self,
database: &mut D,
progress_update: Box<dyn Progress>
) -> Result<(), Error>
fn wallet_setup<D: BatchDatabase>(
&self,
database: &mut D,
progress_update: Box<dyn Progress>
) -> Result<(), Error>
Setup the backend and populate the internal database for the first time Read more
sourcefn wallet_sync<D: BatchDatabase>(
&self,
database: &mut D,
progress_update: Box<dyn Progress>
) -> Result<(), Error>
fn wallet_sync<D: BatchDatabase>(
&self,
database: &mut D,
progress_update: Box<dyn Progress>
) -> Result<(), Error>
If not overridden, it defaults to calling Self::wallet_setup
internally. Read more
Auto Trait Implementations
impl !RefUnwindSafe for CompactFiltersBlockchain
impl Send for CompactFiltersBlockchain
impl Sync for CompactFiltersBlockchain
impl Unpin for CompactFiltersBlockchain
impl !UnwindSafe for CompactFiltersBlockchain
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more