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
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
Trait Implementations
fn watch_channel(
&self,
funding_txo: OutPoint,
monitor: ChannelMonitor<LoopbackChannelSigner>
) -> Result<(), ChannelMonitorUpdateErr>
fn watch_channel(
&self,
funding_txo: OutPoint,
monitor: ChannelMonitor<LoopbackChannelSigner>
) -> Result<(), ChannelMonitorUpdateErr>
Watches a channel identified by funding_txo
using monitor
. Read more
fn update_channel(
&self,
funding_txo: OutPoint,
update: ChannelMonitorUpdate
) -> Result<(), ChannelMonitorUpdateErr>
fn update_channel(
&self,
funding_txo: OutPoint,
update: ChannelMonitorUpdate
) -> Result<(), ChannelMonitorUpdateErr>
Updates a channel identified by funding_txo
by applying update
to its monitor. Read more