@@ -25,7 +25,7 @@ use secp256k1::Secp256k1;
25
25
use secp256k1:: ecdh:: SharedSecret ;
26
26
use secp256k1;
27
27
28
- use chain:: chaininterface:: { BroadcasterInterface , ChainListener , ChainWatchInterface , FeeEstimator } ;
28
+ use chain:: chaininterface:: { BroadcasterInterface , ChainListener , FeeEstimator } ;
29
29
use chain:: transaction:: OutPoint ;
30
30
use ln:: channel:: { Channel , ChannelError } ;
31
31
use ln:: channelmonitor:: { ChannelMonitor , ChannelMonitorUpdateErr , ManyChannelMonitor , CLTV_CLAIM_BUFFER , LATENCY_GRACE_PERIOD_BLOCKS , ANTI_REORG_DELAY } ;
@@ -323,7 +323,6 @@ pub struct ChannelManager {
323
323
genesis_hash : Sha256dHash ,
324
324
fee_estimator : Arc < FeeEstimator > ,
325
325
monitor : Arc < ManyChannelMonitor > ,
326
- chain_monitor : Arc < ChainWatchInterface > ,
327
326
tx_broadcaster : Arc < BroadcasterInterface > ,
328
327
329
328
#[ cfg( test) ]
@@ -585,15 +584,14 @@ impl ChannelManager {
585
584
/// Non-proportional fees are fixed according to our risk using the provided fee estimator.
586
585
///
587
586
/// panics if channel_value_satoshis is >= `MAX_FUNDING_SATOSHIS`!
588
- pub fn new ( network : Network , feeest : Arc < FeeEstimator > , monitor : Arc < ManyChannelMonitor > , chain_monitor : Arc < ChainWatchInterface > , tx_broadcaster : Arc < BroadcasterInterface > , logger : Arc < Logger > , keys_manager : Arc < KeysInterface > , config : UserConfig ) -> Result < Arc < ChannelManager > , secp256k1:: Error > {
587
+ pub fn new ( network : Network , feeest : Arc < FeeEstimator > , monitor : Arc < ManyChannelMonitor > , tx_broadcaster : Arc < BroadcasterInterface > , logger : Arc < Logger > , keys_manager : Arc < KeysInterface > , config : UserConfig ) -> Result < Arc < ChannelManager > , secp256k1:: Error > {
589
588
let secp_ctx = Secp256k1 :: new ( ) ;
590
589
591
590
let res = Arc :: new ( ChannelManager {
592
591
default_configuration : config. clone ( ) ,
593
592
genesis_hash : genesis_block ( network) . header . bitcoin_hash ( ) ,
594
593
fee_estimator : feeest. clone ( ) ,
595
594
monitor : monitor. clone ( ) ,
596
- chain_monitor,
597
595
tx_broadcaster,
598
596
599
597
latest_block_height : AtomicUsize :: new ( 0 ) , //TODO: Get an init value
@@ -3087,10 +3085,7 @@ pub struct ChannelManagerReadArgs<'a> {
3087
3085
/// you have deserialized ChannelMonitors separately and will add them to your
3088
3086
/// ManyChannelMonitor after deserializing this ChannelManager.
3089
3087
pub monitor : Arc < ManyChannelMonitor > ,
3090
- /// The ChainWatchInterface for use in the ChannelManager in the future.
3091
- ///
3092
- /// No calls to the ChainWatchInterface will be made during deserialization.
3093
- pub chain_monitor : Arc < ChainWatchInterface > ,
3088
+
3094
3089
/// The BroadcasterInterface which will be used in the ChannelManager in the future and may be
3095
3090
/// used to broadcast the latest local commitment transactions of channels which must be
3096
3091
/// force-closed during deserialization.
@@ -3116,7 +3111,7 @@ pub struct ChannelManagerReadArgs<'a> {
3116
3111
}
3117
3112
3118
3113
impl < ' a , R : :: std:: io:: Read > ReadableArgs < R , ChannelManagerReadArgs < ' a > > for ( Sha256dHash , ChannelManager ) {
3119
- fn read ( reader : & mut R , args : ChannelManagerReadArgs < ' a > ) -> Result < Self , DecodeError > {
3114
+ fn read ( reader : & mut R , args : ChannelManagerReadArgs ) -> Result < Self , DecodeError > {
3120
3115
let _ver: u8 = Readable :: read ( reader) ?;
3121
3116
let min_ver: u8 = Readable :: read ( reader) ?;
3122
3117
if min_ver > SERIALIZATION_VERSION {
@@ -3193,7 +3188,6 @@ impl<'a, R : ::std::io::Read> ReadableArgs<R, ChannelManagerReadArgs<'a>> for (S
3193
3188
genesis_hash,
3194
3189
fee_estimator : args. fee_estimator ,
3195
3190
monitor : args. monitor ,
3196
- chain_monitor : args. chain_monitor ,
3197
3191
tx_broadcaster : args. tx_broadcaster ,
3198
3192
3199
3193
latest_block_height : AtomicUsize :: new ( latest_block_height as usize ) ,
0 commit comments