@@ -118,7 +118,7 @@ public class ChannelManagerConstructor: NativeTypeWrapper {
118
118
public private( set) var channel_monitors : [ ( ChannelMonitor , [ UInt8 ] ) ]
119
119
120
120
121
- public init ( channelManagerSerialized: [ UInt8 ] , channelMonitorsSerialized: [ [ UInt8 ] ] , networkGraph: NetworkGraphArgument ? , filter: Filter ? , params: ChannelManagerConstructionParameters ) throws {
121
+ public init ( channelManagerSerialized: [ UInt8 ] , channelMonitorsSerialized: [ [ UInt8 ] ] , networkGraph: NetworkGraphArgument , filter: Filter ? , params: ChannelManagerConstructionParameters ) throws {
122
122
123
123
self . constructionParameters = params
124
124
@@ -150,18 +150,15 @@ public class ChannelManagerConstructor: NativeTypeWrapper {
150
150
151
151
print ( " Collected channel monitors, reading channel manager " )
152
152
153
- if let netGraph = networkGraph {
154
- switch netGraph {
155
- case . instance( let graph) :
156
- self . netGraph = graph
157
- case . serialized( let serializedNetworkGraph) :
158
- let netGraphResult = NetworkGraph . read ( ser: serializedNetworkGraph, arg: params. logger)
159
- if !netGraphResult. isOk ( ) {
160
- throw InvalidSerializedDataError . invalidSerializedNetworkGraph
161
- }
162
- self . netGraph = netGraphResult. getValue ( )
153
+ switch networkGraph {
154
+ case . instance( let graph) :
155
+ self . netGraph = graph
156
+ case . serialized( let serializedNetworkGraph) :
157
+ let netGraphResult = NetworkGraph . read ( ser: serializedNetworkGraph, arg: params. logger)
158
+ if !netGraphResult. isOk ( ) {
159
+ throw InvalidSerializedDataError . invalidSerializedNetworkGraph
163
160
}
164
-
161
+ self . netGraph = netGraphResult . getValue ( )
165
162
}
166
163
167
164
// TODO: figure out better way to obtain a router
0 commit comments