diff --git a/ci/LDKSwift/Tests/LDKSwiftTests/HumanObjectPeerTestInstance.swift b/ci/LDKSwift/Tests/LDKSwiftTests/HumanObjectPeerTestInstance.swift index 8e6e0d2d..f9c00c89 100644 --- a/ci/LDKSwift/Tests/LDKSwiftTests/HumanObjectPeerTestInstance.swift +++ b/ci/LDKSwift/Tests/LDKSwiftTests/HumanObjectPeerTestInstance.swift @@ -211,8 +211,8 @@ public class HumanObjectPeerTestInstance { self.interface = underlyingInterface super.init() } - - override func deriveChannelSigner(channelValueSatoshis: UInt64, channelKeysId: [UInt8]) -> Bindings.WriteableEcdsaChannelSigner { + + override func deriveChannelSigner(channelValueSatoshis: UInt64, channelKeysId: [UInt8]) -> Bindings.EcdsaChannelSigner { let ck = self.interface.deriveChannelSigner(channelValueSatoshis: channelValueSatoshis, channelKeysId: channelKeysId) return ck } @@ -226,14 +226,14 @@ public class HumanObjectPeerTestInstance { self.master = master super.init() } - - func handleEvent(event: Event) { - // let eventClone = event.clone() + + func handleEvent(event: Event) -> Result_NoneReplayEventZ { print("peer \(self.master.seed) received event: \(event.getValueType())") Task { // clone to avoid deallocation-related issues await master.pendingEventTracker.addEvent(event: event) } + return .initWithOk() } override func persistScorer(scorer: Bindings.WriteableScore) -> Bindings.Result_NoneIOErrorZ { @@ -252,10 +252,12 @@ public class HumanObjectPeerTestInstance { } fileprivate class TestPersister: Persist { - override func persistNewChannel(channelFundingOutpoint channelId: Bindings.OutPoint, data: Bindings.ChannelMonitor, updateId: Bindings.MonitorUpdateId) -> Bindings.ChannelMonitorUpdateStatus { + + override func persistNewChannel(channelFundingOutpoint: Bindings.OutPoint, monitor: Bindings.ChannelMonitor) -> Bindings.ChannelMonitorUpdateStatus { .Completed } - override func updatePersistedChannel(channelFundingOutpoint channelId: Bindings.OutPoint, update: Bindings.ChannelMonitorUpdate, data: Bindings.ChannelMonitor, updateId: Bindings.MonitorUpdateId) -> Bindings.ChannelMonitorUpdateStatus { + + override func updatePersistedChannel(channelFundingOutpoint: Bindings.OutPoint, monitorUpdate: Bindings.ChannelMonitorUpdate, monitor: Bindings.ChannelMonitor) -> Bindings.ChannelMonitorUpdateStatus { .Completed } } diff --git a/ci/LDKSwift/Tests/LDKSwiftTests/TestChannelManagerPersister.swift b/ci/LDKSwift/Tests/LDKSwiftTests/TestChannelManagerPersister.swift index 63547a19..01c9b893 100644 --- a/ci/LDKSwift/Tests/LDKSwiftTests/TestChannelManagerPersister.swift +++ b/ci/LDKSwift/Tests/LDKSwiftTests/TestChannelManagerPersister.swift @@ -18,9 +18,9 @@ class TestChannelManagerPersister : Persister, ExtendedChannelManagerPersister { self.channelManager = channelManager super.init() } - - func handleEvent(event: Event) { - // privateHandleEvent(event: event) + + func handleEvent(event: Event) -> Result_NoneReplayEventZ { + .initWithOk() } override func persistScorer(scorer: Bindings.WriteableScore) -> Bindings.Result_NoneIOErrorZ { diff --git a/ci/LDKSwift/Tests/LDKSwiftTests/TestPersister.swift b/ci/LDKSwift/Tests/LDKSwiftTests/TestPersister.swift index 1684e14e..0d00074c 100644 --- a/ci/LDKSwift/Tests/LDKSwiftTests/TestPersister.swift +++ b/ci/LDKSwift/Tests/LDKSwiftTests/TestPersister.swift @@ -11,12 +11,12 @@ import LDKHeaders #endif class TestPersister: Persist { - - override func persistNewChannel(channelFundingOutpoint channelId: Bindings.OutPoint, data: Bindings.ChannelMonitor, updateId: Bindings.MonitorUpdateId) -> Bindings.ChannelMonitorUpdateStatus { + + override func persistNewChannel(channelFundingOutpoint: Bindings.OutPoint, monitor: Bindings.ChannelMonitor) -> Bindings.ChannelMonitorUpdateStatus { .Completed } - override func updatePersistedChannel(channelFundingOutpoint channelId: Bindings.OutPoint, update: Bindings.ChannelMonitorUpdate, data: Bindings.ChannelMonitor, updateId: Bindings.MonitorUpdateId) -> Bindings.ChannelMonitorUpdateStatus { + override func updatePersistedChannel(channelFundingOutpoint: Bindings.OutPoint, monitorUpdate: Bindings.ChannelMonitorUpdate, monitor: Bindings.ChannelMonitor) -> Bindings.ChannelMonitorUpdateStatus { .Completed } diff --git a/ci/LDKSwift/Tests/LDKSwiftTests/WrappedSignerProviderTests.swift b/ci/LDKSwift/Tests/LDKSwiftTests/WrappedSignerProviderTests.swift index a42c76df..0c6c94c4 100644 --- a/ci/LDKSwift/Tests/LDKSwiftTests/WrappedSignerProviderTests.swift +++ b/ci/LDKSwift/Tests/LDKSwiftTests/WrappedSignerProviderTests.swift @@ -37,7 +37,7 @@ class WrappedSignerProviderTests: XCTestCase { let handshakeConfig = ChannelHandshakeConfig.initWithDefault() handshakeConfig.setMinimumDepth(val: 1) - handshakeConfig.setAnnouncedChannel(val: false) + // handshakeConfig.setAnnouncedChannel(val: false) let handshakeLimits = ChannelHandshakeLimits.initWithDefault() handshakeLimits.setForceAnnouncedChannelPreference(val: false) @@ -105,10 +105,10 @@ class WrappedSignerProviderTests: XCTestCase { print("entering wrapper: signGossipMessage()") return myKeysManager!.keysManager.asNodeSigner().signGossipMessage(msg: msg) } - - override func signInvoice(hrpBytes: [UInt8], invoiceData: [UInt8], recipient: Bindings.Recipient) -> Bindings.Result_RecoverableSignatureNoneZ { + + override func signInvoice(invoice: Bindings.RawBolt11Invoice, recipient: Bindings.Recipient) -> Bindings.Result_RecoverableSignatureNoneZ { print("entering wrapper: signInvoice()") - return myKeysManager!.keysManager.asNodeSigner().signInvoice(hrpBytes: hrpBytes, invoiceData: invoiceData, recipient: recipient) + return myKeysManager!.keysManager.asNodeSigner().signInvoice(invoice: invoice, recipient: recipient) } } @@ -122,17 +122,18 @@ class WrappedSignerProviderTests: XCTestCase { class MySignerProvider: SignerProvider { weak var myKeysManager: MyKeysManager? - override func deriveChannelSigner(channelValueSatoshis: UInt64, channelKeysId: [UInt8]) -> Bindings.WriteableEcdsaChannelSigner { + + override func deriveChannelSigner(channelValueSatoshis: UInt64, channelKeysId: [UInt8]) -> Bindings.EcdsaChannelSigner { print("entering wrapper: deriveChannelSigner()") - return myKeysManager!.keysManager.asSignerProvider().deriveChannelSigner(channelValueSatoshis: channelValueSatoshis, channelKeysId: channelKeysId) + return myKeysManager!.keysManager.deriveChannelKeys(channelValueSatoshis: channelValueSatoshis, params: channelKeysId).asEcdsaChannelSigner() } override func generateChannelKeysId(inbound: Bool, channelValueSatoshis: UInt64, userChannelId: [UInt8]) -> [UInt8] { print("entering wrapper: generateChannelKeysId()") return myKeysManager!.keysManager.asSignerProvider().generateChannelKeysId(inbound: inbound, channelValueSatoshis: channelValueSatoshis, userChannelId: userChannelId) } - - override func readChanSigner(reader: [UInt8]) -> Bindings.Result_WriteableEcdsaChannelSignerDecodeErrorZ { + + override func readChanSigner(reader: [UInt8]) -> Bindings.Result_EcdsaChannelSignerDecodeErrorZ { print("entering wrapper: readChanSigner()") return myKeysManager!.keysManager.asSignerProvider().readChanSigner(reader: reader) }