use secp256k1::ecdh::SharedSecret;
use secp256k1;
-use chain::chaininterface::{BroadcasterInterface,ChainListener,ChainWatchInterface,FeeEstimator};
+use chain::chaininterface::{BroadcasterInterface,ChainListener,FeeEstimator};
use chain::transaction::OutPoint;
use ln::channel::{Channel, ChannelError};
use ln::channelmonitor::{ChannelMonitor, ChannelMonitorUpdateErr, ManyChannelMonitor, CLTV_CLAIM_BUFFER, LATENCY_GRACE_PERIOD_BLOCKS, ANTI_REORG_DELAY};
genesis_hash: Sha256dHash,
fee_estimator: Arc<FeeEstimator>,
monitor: Arc<ManyChannelMonitor>,
- chain_monitor: Arc<ChainWatchInterface>,
tx_broadcaster: Arc<BroadcasterInterface>,
#[cfg(test)]
genesis_hash: genesis_block(network).header.bitcoin_hash(),
fee_estimator: feeest.clone(),
monitor: monitor.clone(),
- chain_monitor,
tx_broadcaster,
latest_block_height: AtomicUsize::new(current_blockchain_height),
logger,
});
- let weak_res = Arc::downgrade(&res);
- res.chain_monitor.register_listener(weak_res);
+
Ok(res)
}
/// you have deserialized ChannelMonitors separately and will add them to your
/// ManyChannelMonitor after deserializing this ChannelManager.
pub monitor: Arc<ManyChannelMonitor>,
- /// The ChainWatchInterface for use in the ChannelManager in the future.
- ///
- /// No calls to the ChainWatchInterface will be made during deserialization.
- pub chain_monitor: Arc<ChainWatchInterface>,
+
/// The BroadcasterInterface which will be used in the ChannelManager in the future and may be
/// used to broadcast the latest local commitment transactions of channels which must be
/// force-closed during deserialization.
genesis_hash,
fee_estimator: args.fee_estimator,
monitor: args.monitor,
- chain_monitor: args.chain_monitor,
tx_broadcaster: args.tx_broadcaster,
latest_block_height: AtomicUsize::new(latest_block_height as usize),