pub enum ConnectStyle {
BestBlockFirst,
BestBlockFirstSkippingBlocks,
BestBlockFirstReorgsOnlyTip,
TransactionsFirst,
TransactionsFirstSkippingBlocks,
TransactionsDuplicativelyFirstSkippingBlocks,
HighlyRedundantTransactionsFirstSkippingBlocks,
TransactionsFirstReorgsOnlyTip,
FullBlockViaListen,
}
Expand description
The possible ways we may notify a ChannelManager of a new block
Variants§
BestBlockFirst
Calls best_block_updated
first, detecting transactions in the block only after receiving
the header and height information.
BestBlockFirstSkippingBlocks
The same as BestBlockFirst
, however when we have multiple blocks to connect, we only
make a single best_block_updated
call.
BestBlockFirstReorgsOnlyTip
The same as BestBlockFirst
when connecting blocks. During disconnection only
transaction_unconfirmed
is called.
TransactionsFirst
Calls transactions_confirmed
first, detecting transactions in the block before updating
the header and height information.
TransactionsFirstSkippingBlocks
The same as TransactionsFirst
, however when we have multiple blocks to connect, we only
make a single best_block_updated
call.
TransactionsDuplicativelyFirstSkippingBlocks
The same as TransactionsFirst
, however when we have multiple blocks to connect, we only
make a single best_block_updated
call. Further, we call transactions_confirmed
multiple
times to ensure it’s idempotent.
HighlyRedundantTransactionsFirstSkippingBlocks
The same as TransactionsFirst
, however when we have multiple blocks to connect, we only
make a single best_block_updated
call. Further, we call transactions_confirmed
multiple
times to ensure it’s idempotent.
TransactionsFirstReorgsOnlyTip
The same as TransactionsFirst
when connecting blocks. During disconnection only
transaction_unconfirmed
is called.
FullBlockViaListen
Provides the full block via the chain::Listen
interface. In the current code this is
equivalent to TransactionsFirst
with some additional assertions.
Implementations§
§impl ConnectStyle
impl ConnectStyle
pub fn skips_blocks(&self) -> bool
pub fn updates_best_block_first(&self) -> bool
Trait Implementations§
§impl Clone for ConnectStyle
impl Clone for ConnectStyle
§fn clone(&self) -> ConnectStyle
fn clone(&self) -> ConnectStyle
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for ConnectStyle
impl Debug for ConnectStyle
§impl PartialEq for ConnectStyle
impl PartialEq for ConnectStyle
impl Copy for ConnectStyle
impl StructuralPartialEq for ConnectStyle
Auto Trait Implementations§
impl Freeze for ConnectStyle
impl RefUnwindSafe for ConnectStyle
impl Send for ConnectStyle
impl Sync for ConnectStyle
impl Unpin for ConnectStyle
impl UnwindSafe for ConnectStyle
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any
.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any
.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request