X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=lightning%2Fsrc%2Fln%2Fchannelmanager.rs;h=3b17813749bde04fbeb9207d67be2ffbe7dce298;hb=b1d536e57ac99c7446f50c4f64c4a8b46c3b3830;hp=d1004bcef3d015037801831e04b52d7ca03a7422;hpb=6afda60d8898455a003e7e085e0b6f1c1277d8fa;p=rust-lightning diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index d1004bce..3b178137 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -707,10 +707,10 @@ impl /// the ChannelManager as a listener to the BlockNotifier and call the BlockNotifier's /// `block_(dis)connected` methods, which will notify all registered listeners in one /// go. - pub fn new(network: Network, fee_est: F, monitor: M, tx_broadcaster: T, logger: L, keys_manager: K, config: UserConfig, current_blockchain_height: usize) -> Result, secp256k1::Error> { + pub fn new(network: Network, fee_est: F, monitor: M, tx_broadcaster: T, logger: L, keys_manager: K, config: UserConfig, current_blockchain_height: usize) -> Self { let secp_ctx = Secp256k1::new(); - let res = ChannelManager { + ChannelManager { default_configuration: config.clone(), genesis_hash: genesis_block(network).header.bitcoin_hash(), fee_estimator: fee_est, @@ -740,9 +740,7 @@ impl keys_manager, logger, - }; - - Ok(res) + } } /// Creates a new outbound channel to the given remote node and with the given value.