Struct lightning_signer::monitor::ChainMonitorBase
source · 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) -> Self
pub fn new(funding_outpoint: OutPoint, height: u32) -> Self
Create a new chain monitor. Use add_funding to really start monitoring.
sourcepub fn new_from_persistence(funding_outpoint: OutPoint, state: State) -> Self
pub fn new_from_persistence(funding_outpoint: OutPoint, state: State) -> 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
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 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