Struct lightning_signer::util::test_utils::TestChainMonitor [−][src]
pub struct TestChainMonitor<'a> { pub added_monitors: Mutex<Vec<(OutPoint, ())>>, pub latest_monitor_update_id: Mutex<Map<[u8; 32], (OutPoint, u64)>>, pub chain_monitor: ChainMonitor<LoopbackChannelSigner, &'a TestChainSource, &'a dyn BroadcasterInterface, &'a TestFeeEstimator, &'a TestLogger, &'a dyn Persist<LoopbackChannelSigner>>, pub update_ret: Mutex<Option<Result<(), ChannelMonitorUpdateErr>>>, pub next_update_ret: Mutex<Option<Result<(), ChannelMonitorUpdateErr>>>, }
Fields
added_monitors: Mutex<Vec<(OutPoint, ())>>
latest_monitor_update_id: Mutex<Map<[u8; 32], (OutPoint, u64)>>
chain_monitor: ChainMonitor<LoopbackChannelSigner, &'a TestChainSource, &'a dyn BroadcasterInterface, &'a TestFeeEstimator, &'a TestLogger, &'a dyn Persist<LoopbackChannelSigner>>
update_ret: Mutex<Option<Result<(), ChannelMonitorUpdateErr>>>
next_update_ret: Mutex<Option<Result<(), ChannelMonitorUpdateErr>>>
Implementations
impl<'a> TestChainMonitor<'a>
[src]
impl<'a> TestChainMonitor<'a>
[src]pub fn new(
chain_source: Option<&'a TestChainSource>,
broadcaster: &'a dyn BroadcasterInterface,
logger: &'a TestLogger,
fee_estimator: &'a TestFeeEstimator,
persister: &'a dyn Persist<LoopbackChannelSigner>
) -> Self
[src]
chain_source: Option<&'a TestChainSource>,
broadcaster: &'a dyn BroadcasterInterface,
logger: &'a TestLogger,
fee_estimator: &'a TestFeeEstimator,
persister: &'a dyn Persist<LoopbackChannelSigner>
) -> Self
Trait Implementations
impl<'a> Watch<LoopbackChannelSigner> for TestChainMonitor<'a>
[src]
impl<'a> Watch<LoopbackChannelSigner> for TestChainMonitor<'a>
[src]fn watch_channel(
&self,
funding_txo: OutPoint,
monitor: ChannelMonitor<LoopbackChannelSigner>
) -> Result<(), ChannelMonitorUpdateErr>
[src]
fn watch_channel(
&self,
funding_txo: OutPoint,
monitor: ChannelMonitor<LoopbackChannelSigner>
) -> Result<(), ChannelMonitorUpdateErr>
[src]Watches a channel identified by funding_txo
using monitor
. Read more
fn update_channel(
&self,
funding_txo: OutPoint,
update: ChannelMonitorUpdate
) -> Result<(), ChannelMonitorUpdateErr>
[src]
fn update_channel(
&self,
funding_txo: OutPoint,
update: ChannelMonitorUpdate
) -> Result<(), ChannelMonitorUpdateErr>
[src]Updates a channel identified by funding_txo
by applying update
to its monitor. Read more
fn release_pending_monitor_events(&self) -> Vec<MonitorEvent>
[src]
fn release_pending_monitor_events(&self) -> Vec<MonitorEvent>
[src]Returns any monitor events since the last call. Subsequent calls must only return new events. Read more