Skip to content

Commit 7e2183d

Browse files
committed
Always print details of channel watch call gone wrong in chain sync complete
1 parent 77c9aee commit 7e2183d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ci/LDKSwift/Sources/LDKSwift/batteries/ChannelManagerConstructor.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public class ChannelManagerConstructor: NativeTypeWrapper {
7373

7474
let blockHash = Bindings.LDKThirtyTwoBytes_to_array(nativeType: a);
7575
let clonedChannelMonitor = ChannelMonitor(pointer: b).dangle().clone()
76-
76+
7777
if let channelFundingOutpoint = clonedChannelMonitor.get_funding_txo().getA() {
7878
let fundingOutpointHash = "\(channelFundingOutpoint.get_txid()):\(channelFundingOutpoint.get_index())"
7979
if monitorFundingSet.contains(fundingOutpointHash) {
@@ -82,7 +82,7 @@ public class ChannelManagerConstructor: NativeTypeWrapper {
8282
}
8383
monitorFundingSet.insert(fundingOutpointHash)
8484
}
85-
85+
8686
clonedChannelMonitor.cOpaqueStruct?.is_owned = false // is_owned should never have to be modified
8787

8888
monitors.append(clonedChannelMonitor.cOpaqueStruct!)
@@ -214,7 +214,7 @@ public class ChannelManagerConstructor: NativeTypeWrapper {
214214
print("watching channel")
215215
let monitorWatchResult = chainMonitorWatch.watch_channel(funding_txo: outPoint, monitor: monitorClone)
216216
if monitorWatchResult != LDKChannelMonitorUpdateStatus_Completed {
217-
print("Some error occurred with a chainMonitorWatch.watch_channel call: \(monitorWatchResult)")
217+
Bindings.print("Some issue occurred with a chainMonitorWatch.watch_channel call: \(monitorWatchResult)", severity: .WARNING)
218218
}
219219
monitorClone.cOpaqueStruct?.is_owned = true
220220
}
@@ -314,7 +314,7 @@ fileprivate class CustomChannelManagerPersister: Persister {
314314
override func persist_graph(network_graph: NetworkGraph) -> Result_NoneErrorZ {
315315
return self.handler.persist_graph(network_graph: network_graph)
316316
}
317-
317+
318318
override func persist_scorer(scorer: Bindings.WriteableScore) -> Bindings.Result_NoneErrorZ {
319319
return self.handler.persist_scorer(scorer: scorer)
320320
}

0 commit comments

Comments
 (0)