@@ -123,11 +123,11 @@ public class HumanObjectPeerTestInstance {
123
123
}
124
124
125
125
fileprivate class TestPersister: Persist {
126
- override func persist_new_channel(id : OutPoint, data: ChannelMonitor) -> Result_NoneChannelMonitorUpdateErrZ {
126
+ override func persist_new_channel(channel_id : OutPoint, data: ChannelMonitor, update_id: MonitorUpdateId ) -> Result_NoneChannelMonitorUpdateErrZ {
127
127
return Result_NoneChannelMonitorUpdateErrZ.ok()
128
128
}
129
129
130
- override func update_persisted_channel(id : OutPoint, update: ChannelMonitorUpdate, data: ChannelMonitor) -> Result_NoneChannelMonitorUpdateErrZ {
130
+ override func update_persisted_channel(channel_id : OutPoint, update: ChannelMonitorUpdate, data: ChannelMonitor, update_id: MonitorUpdateId ) -> Result_NoneChannelMonitorUpdateErrZ {
131
131
return Result_NoneChannelMonitorUpdateErrZ.ok()
132
132
}
133
133
}
@@ -180,8 +180,14 @@ public class HumanObjectPeerTestInstance {
180
180
self.init(master: master, _dummy: (), seed: seed)
181
181
182
182
if master.use_chan_manager_constructor {
183
- self.constructor = ChannelManagerConstructor(network: LDKNetwork_Bitcoin, config: UserConfig(), current_blockchain_tip_hash: [UInt8](repeating: 0, count: 32), current_blockchain_tip_height: 0, keys_interface: self.keysInterface, fee_estimator: self.feeEstimator, chain_monitor: self.chainMonitor!, router: self.router, tx_broadcaster: self.txBroadcaster, logger: self.logger)
184
- self.constructor?.chain_sync_completed(persister: TestChannelManagerPersister(master: self))
183
+
184
+ let graph = NetworkGraph(genesis_hash: [UInt8](repeating: 0, count: 32))
185
+ self.constructor = ChannelManagerConstructor(network: LDKNetwork_Bitcoin, config: UserConfig(), current_blockchain_tip_hash: [UInt8](repeating: 0, count: 32), current_blockchain_tip_height: 0, keys_interface: self.keysInterface, fee_estimator: self.feeEstimator, chain_monitor: self.chainMonitor!, net_graph: graph, tx_broadcaster: self.txBroadcaster, logger: self.logger)
186
+
187
+ // self.constructor = ChannelManagerConstructor(network: LDKNetwork_Bitcoin, config: UserConfig(), current_blockchain_tip_hash: [UInt8](repeating: 0, count: 32), current_blockchain_tip_height: 0, keys_interface: self.keysInterface, fee_estimator: self.feeEstimator, chain_monitor: self.chainMonitor!, net_graph: nil, tx_broadcaster: self.txBroadcaster, logger: self.logger)
188
+
189
+
190
+ self.constructor?.chain_sync_completed(persister: TestChannelManagerPersister(master: self), scorer: nil)
185
191
self.channelManager = self.constructor!.channelManager
186
192
self.peerManager = self.constructor!.peerManager
187
193
} else {
@@ -199,8 +205,9 @@ public class HumanObjectPeerTestInstance {
199
205
self.init(master: original.master, _dummy: (), seed: original.seed)
200
206
201
207
if master.use_chan_manager_constructor {
202
- self.constructor = ChannelManagerConstructor(network: LDKNetwork_Bitcoin, config: UserConfig(), current_blockchain_tip_hash: [UInt8](repeating: 0, count: 32), current_blockchain_tip_height: 0, keys_interface: self.keysInterface, fee_estimator: self.feeEstimator, chain_monitor: self.chainMonitor!, router: self.router, tx_broadcaster: self.txBroadcaster, logger: self.logger)
203
- self.constructor?.chain_sync_completed(persister: TestChannelManagerPersister(master: self))
208
+ let graph = NetworkGraph(genesis_hash: [UInt8](repeating: 0, count: 32))
209
+ self.constructor = ChannelManagerConstructor(network: LDKNetwork_Bitcoin, config: UserConfig(), current_blockchain_tip_hash: [UInt8](repeating: 0, count: 32), current_blockchain_tip_height: 0, keys_interface: self.keysInterface, fee_estimator: self.feeEstimator, chain_monitor: self.chainMonitor!, net_graph: graph, tx_broadcaster: self.txBroadcaster, logger: self.logger)
210
+ self.constructor?.chain_sync_completed(persister: TestChannelManagerPersister(master: self), scorer: nil)
204
211
self.channelManager = self.constructor!.channelManager
205
212
self.peerManager = self.constructor!.peerManager
206
213
self.pendingManagerEvents.append(contentsOf: original.pendingManagerEvents)
0 commit comments