@@ -54,7 +54,7 @@ public class ChannelManagerConstructor: NativeTypeWrapper {
5454 private let chain_monitor : ChainMonitor
5555
5656
57- public init ( channelManagerSerialized: [ UInt8 ] , channelMonitorsSerialized: [ [ UInt8 ] ] , keysInterface: KeysInterface , feeEstimator: FeeEstimator , chainMonitor: ChainMonitor , filter: Filter ? , netGraphSerialized: [ UInt8 ] ? , txBroadcaster: BroadcasterInterface , logger: Logger , enableP2PGossip: Bool = false ) throws {
57+ public init ( channelManagerSerialized: [ UInt8 ] , channelMonitorsSerialized: [ [ UInt8 ] ] , keysInterface: KeysInterface , feeEstimator: FeeEstimator , chainMonitor: ChainMonitor , filter: Filter ? , netGraphSerialized: [ UInt8 ] ? , txBroadcaster: BroadcasterInterface , logger: Logger , enableP2PGossip: Bool = false , userConfig : UserConfig = UserConfig . initWithDefault ( ) ) throws {
5858
5959 var monitors : [ ChannelMonitor ] = [ ]
6060 self . channel_monitors = [ ]
@@ -83,8 +83,7 @@ public class ChannelManagerConstructor: NativeTypeWrapper {
8383 }
8484
8585 print ( " Collected channel monitors, reading channel manager " )
86- let channelManagerReadArgs = ChannelManagerReadArgs ( keysManager: keysInterface, feeEstimator: feeEstimator, chainMonitor: chainMonitor. asWatch ( ) , txBroadcaster: txBroadcaster, logger: logger, defaultConfig: UserConfig . initWithDefault ( ) , channelMonitors: monitors)
87-
86+ let channelManagerReadArgs = ChannelManagerReadArgs ( keysManager: keysInterface, feeEstimator: feeEstimator, chainMonitor: chainMonitor. asWatch ( ) , txBroadcaster: txBroadcaster, logger: logger, defaultConfig: userConfig, channelMonitors: monitors)
8887
8988 guard let ( latestBlockHash, channelManager) = Bindings . readBlockHashChannelManager ( ser: channelManagerSerialized, arg: channelManagerReadArgs) . getValue ( ) else {
9089 throw InvalidSerializedDataError . invalidSerializedChannelManager
@@ -143,14 +142,14 @@ public class ChannelManagerConstructor: NativeTypeWrapper {
143142 /**
144143 * Constructs a channel manager from the given interface implementations
145144 */
146- public init ( network: Network , config : UserConfig , currentBlockchainTipHash: [ UInt8 ] , currentBlockchainTipHeight: UInt32 , keysInterface: KeysInterface , feeEstimator: FeeEstimator , chainMonitor: ChainMonitor , netGraph: NetworkGraph ? , txBroadcaster: BroadcasterInterface , logger: Logger , enableP2PGossip: Bool = false ) {
145+ public init ( network: Network , userConfig : UserConfig , currentBlockchainTipHash: [ UInt8 ] , currentBlockchainTipHeight: UInt32 , keysInterface: KeysInterface , feeEstimator: FeeEstimator , chainMonitor: ChainMonitor , netGraph: NetworkGraph ? , txBroadcaster: BroadcasterInterface , logger: Logger , enableP2PGossip: Bool = false ) {
147146
148147 self . channel_monitors = [ ]
149148 self . channel_manager_latest_block_hash = nil
150149 self . chain_monitor = chainMonitor
151150 let block = BestBlock ( blockHash: currentBlockchainTipHash, height: currentBlockchainTipHeight)
152151 let chainParameters = ChainParameters ( networkArg: network, bestBlockArg: block)
153- self . channelManager = ChannelManager ( feeEst: feeEstimator, chainMonitor: chainMonitor. asWatch ( ) , txBroadcaster: txBroadcaster, logger: logger, keysManager: keysInterface, config: config , params: chainParameters)
152+ self . channelManager = ChannelManager ( feeEst: feeEstimator, chainMonitor: chainMonitor. asWatch ( ) , txBroadcaster: txBroadcaster, logger: logger, keysManager: keysInterface, config: userConfig , params: chainParameters)
154153 self . logger = logger
155154
156155 self . keysInterface = keysInterface
0 commit comments