pub struct ChainMonitorBase { /* private fields */ }
Expand description
This is a pre-cursor to ChainMonitor
, before the CommitmentPointProvider
is available.
Implementations§
Source§impl ChainMonitorBase
impl ChainMonitorBase
Sourcepub fn new(funding_outpoint: OutPoint, height: u32, chan_id: &ChannelId) -> Self
pub fn new(funding_outpoint: OutPoint, height: u32, chan_id: &ChannelId) -> Self
Create a new chain monitor. Use add_funding to really start monitoring.
Sourcepub fn new_from_persistence(
funding_outpoint: OutPoint,
state: State,
channel_id: &ChannelId,
) -> Self
pub fn new_from_persistence( funding_outpoint: OutPoint, state: State, channel_id: &ChannelId, ) -> Self
recreate this monitor after restoring from persistence
Sourcepub fn as_monitor(
&self,
commitment_point_provider: Box<dyn CommitmentPointProvider>,
) -> ChainMonitor
pub fn as_monitor( &self, commitment_point_provider: Box<dyn CommitmentPointProvider>, ) -> ChainMonitor
Get the ChainMonitor
Sourcepub fn add_funding_outpoint(&self, outpoint: &OutPoint)
pub fn add_funding_outpoint(&self, outpoint: &OutPoint)
Add a funding transaction to keep track of For single-funding
Sourcepub fn add_funding_inputs(&self, tx: &Transaction)
pub fn add_funding_inputs(&self, tx: &Transaction)
Add a funding input For single-funding
Sourcepub fn as_chain_state(&self) -> ChainState
pub fn as_chain_state(&self) -> ChainState
Convert to a ChainState, to be used for validation
Sourcepub fn forget_channel(&self)
pub fn forget_channel(&self)
Called when the node tells us it forgot the channel
Sourcepub fn funding_outpoint(&self) -> Option<OutPoint>
pub fn funding_outpoint(&self) -> Option<OutPoint>
Returns the actual funding outpoint on-chain
Sourcepub fn forget_seen(&self) -> bool
pub fn forget_seen(&self) -> bool
Return whether forget_channel was seen
Sourcepub fn diagnostic(&self, is_closed: bool) -> String
pub fn diagnostic(&self, is_closed: bool) -> String
Return string describing the state
Trait Implementations§
Source§impl Clone for ChainMonitorBase
impl Clone for ChainMonitorBase
Source§fn clone(&self) -> ChainMonitorBase
fn clone(&self) -> ChainMonitorBase
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ChainMonitorBase
impl RefUnwindSafe for ChainMonitorBase
impl Send for ChainMonitorBase
impl Sync for ChainMonitorBase
impl Unpin for ChainMonitorBase
impl UnwindSafe for ChainMonitorBase
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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