pub struct CompactFiltersBlockchain { /* private fields */ }Available on crate feature
compact_filters only.Expand description
Structure implementing the required blockchain traits
Example
See the blockchain::compact_filters module for a usage example.
Implementations§
source§impl 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§
source§impl Blockchain for CompactFiltersBlockchain
impl Blockchain for CompactFiltersBlockchain
source§fn get_capabilities(&self) -> HashSet<Capability>
fn get_capabilities(&self) -> HashSet<Capability>
Return the set of
Capability supported by this backendsource§impl ConfigurableBlockchain for CompactFiltersBlockchain
impl ConfigurableBlockchain for CompactFiltersBlockchain
§type Config = CompactFiltersBlockchainConfig
type Config = CompactFiltersBlockchainConfig
Type that contains the configuration
source§impl Debug for CompactFiltersBlockchain
impl Debug for CompactFiltersBlockchain
source§impl From<CompactFiltersBlockchain> for AnyBlockchain
impl From<CompactFiltersBlockchain> for AnyBlockchain
source§fn from(inner: CompactFiltersBlockchain) -> Self
fn from(inner: CompactFiltersBlockchain) -> Self
Converts to this type from the input type.
source§impl GetHeight for CompactFiltersBlockchain
impl GetHeight for CompactFiltersBlockchain
source§impl GetTx for CompactFiltersBlockchain
impl GetTx for CompactFiltersBlockchain
source§impl WalletSync for CompactFiltersBlockchain
impl WalletSync for CompactFiltersBlockchain
source§fn wallet_setup<D: BatchDatabase>(
&self,
database: &RefCell<D>,
progress_update: Box<dyn Progress>
) -> Result<(), Error>
fn wallet_setup<D: BatchDatabase>( &self, database: &RefCell<D>, progress_update: Box<dyn Progress> ) -> Result<(), Error>
Setup the backend and populate the internal database for the first time Read more
source§fn wallet_sync<D: BatchDatabase>(
&self,
database: &RefCell<D>,
progress_update: Box<dyn Progress>
) -> Result<(), Error>
fn wallet_sync<D: BatchDatabase>( &self, database: &RefCell<D>, progress_update: Box<dyn Progress> ) -> Result<(), Error>
If not overridden, it defaults to calling
Self::wallet_setup internally. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for CompactFiltersBlockchain
impl Send for CompactFiltersBlockchain
impl Sync for CompactFiltersBlockchain
impl Unpin for CompactFiltersBlockchain
impl !UnwindSafe for CompactFiltersBlockchain
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more