Skip to content

Commit 4072cb1

Browse files
committed
start calling chain_sync_completed
1 parent e8dc387 commit 4072cb1

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

bindings/batteries/ChannelManagerConstructor.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77

88
import Foundation
9-
import LDKHeaders
9+
// import LDKHeaders
1010

1111
enum InvalidSerializedDataError: Error {
1212
case invalidSerializedChannelMonitor
@@ -106,7 +106,7 @@ public class ChannelManagerConstructor {
106106

107107
}
108108

109-
/*
109+
110110

111111
/**
112112
* Constructs a channel manager from the given interface implementations
@@ -148,13 +148,13 @@ public class ChannelManagerConstructor {
148148
return
149149
}
150150

151-
for (monitorClone, _) in self.channel_monitors {
151+
for (currentChannelMonitor, _) in self.channel_monitors {
152152
let chainMonitorWatch = self.chain_monitor.as_Watch()
153-
// let monitorClone = currentChannelMonitor.clone(orig: currentChannelMonitor)
153+
let monitorClone = currentChannelMonitor.clone()
154154
monitorClone.cOpaqueStruct?.is_owned = false
155155
let fundingTxo = monitorClone.get_funding_txo()
156156
let outPoint = OutPoint(pointer: fundingTxo.cOpaqueStruct!.a)
157-
157+
print("watching channel")
158158
let monitorWatchResult = chainMonitorWatch.watch_channel(funding_txo: outPoint, monitor: monitorClone)
159159
if !monitorWatchResult.isOk() {
160160
print("Some error occurred with a chainMonitorWatch.watch_channel call")
@@ -172,7 +172,7 @@ public class ChannelManagerConstructor {
172172
self.shutdown = true
173173
self.backgroundProcessor?.stop()
174174
}
175-
*/
175+
176176

177177
}
178178

ci/LDKSwift/Tests/LDKSwiftTests/LDKSwiftTest.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,12 @@ class LDKSwiftTest: XCTestCase {
6969
tx_broadcaster: broadcaster,
7070
logger: logger
7171
)
72-
/*
72+
7373
let channel_manager = channel_manager_constructor.channelManager;
7474
let cmPersister = TestChannelManagerPersister(channelManager: channel_manager)
75+
7576
channel_manager_constructor.chain_sync_completed(persister: cmPersister)
76-
*/
77+
7778
}
7879

7980
/*

src/sdk_generator.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import conversion_helper
21
from src.lightning_header_parser import LightningHeaderParser
32
from src.generators.opaque_struct_generator import OpaqueStructGenerator
43
from src.generators.tuple_generator import TupleGenerator
@@ -92,7 +91,7 @@ def generate_trait_placeholders(parser: LightningHeaderParser, returned_trait_in
9291

9392

9493
def initialize_conversion_helper_knowledge(parser: LightningHeaderParser):
95-
conversion_helper.ConversionHelper.trait_structs = parser.trait_structs
94+
src.conversion_helper.ConversionHelper.trait_structs = parser.trait_structs
9695

9796

9897
def generate_sdk():

0 commit comments

Comments
 (0)