@@ -54,7 +54,7 @@ public class ChannelManagerConstructor: NativeTypeWrapper {
54
54
private let chain_monitor : ChainMonitor
55
55
56
56
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 {
58
58
59
59
var monitors : [ ChannelMonitor ] = [ ]
60
60
self . channel_monitors = [ ]
@@ -83,8 +83,7 @@ public class ChannelManagerConstructor: NativeTypeWrapper {
83
83
}
84
84
85
85
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)
88
87
89
88
guard let ( latestBlockHash, channelManager) = Bindings . readBlockHashChannelManager ( ser: channelManagerSerialized, arg: channelManagerReadArgs) . getValue ( ) else {
90
89
throw InvalidSerializedDataError . invalidSerializedChannelManager
@@ -143,14 +142,14 @@ public class ChannelManagerConstructor: NativeTypeWrapper {
143
142
/**
144
143
* Constructs a channel manager from the given interface implementations
145
144
*/
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 ) {
147
146
148
147
self . channel_monitors = [ ]
149
148
self . channel_manager_latest_block_hash = nil
150
149
self . chain_monitor = chainMonitor
151
150
let block = BestBlock ( blockHash: currentBlockchainTipHash, height: currentBlockchainTipHeight)
152
151
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)
154
153
self . logger = logger
155
154
156
155
self . keysInterface = keysInterface
0 commit comments