pub struct LitecoinSource { /* private fields */ }Expand description
Checkpoint-relative Litecoin light client. Does not validate scripts, UTXOs or MWEB consensus. Opening it does not start network connections; the first sync attempt does. An application start before the configured anchor is an explicit error, never silently replaced with the anchor’s height.
Implementations§
Source§impl LitecoinSource
impl LitecoinSource
pub fn open( chain: Chain, cache: &Path, anchor: Anchor, peers: Vec<SocketAddr>, ) -> Result<Self, Error>
Sourcepub fn open_bootstrap(
cache: &Path,
bootstrap: HeaderBootstrap,
peers: Vec<SocketAddr>,
) -> Result<Self, Error>
pub fn open_bootstrap( cache: &Path, bootstrap: HeaderBootstrap, peers: Vec<SocketAddr>, ) -> Result<Self, Error>
Open a Litecoin source with authenticated preceding header context. The operator trusts the bootstrap anchor’s chain membership and height; the context does not prove pre-anchor consensus or earlier scan coverage. This source does not validate scripts, UTXOs or MWEB consensus. Opening only loads the local cache; the first sync attempt starts connections.
Trait Implementations§
Source§impl ChainSource for LitecoinSource
impl ChainSource for LitecoinSource
fn genesis(&self) -> Result<BlockHash, Error>
fn tip(&self) -> Result<ChainPoint, Error>
fn header(&self, height: u64) -> Result<Header, Error>
fn block(&self, height: u64) -> Result<Vec<u8>, Error>
Source§fn chain_peers(&self) -> Result<u64, Error>
fn chain_peers(&self) -> Result<u64, Error>
Connected chain peers now; 0 for sources without a peer network.
Source§fn chain_target(&self) -> Option<u64>
fn chain_target(&self) -> Option<u64>
Absolute header-sync target announced by chain peers;
None while
unknown or for sources without a peer network.Auto Trait Implementations§
impl !Freeze for LitecoinSource
impl RefUnwindSafe for LitecoinSource
impl Send for LitecoinSource
impl Sync for LitecoinSource
impl Unpin for LitecoinSource
impl UnsafeUnpin for LitecoinSource
impl UnwindSafe for LitecoinSource
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more