Skip to content

Commit c28c2ac

Browse files
committed
Adjust RegtestChannelManagerPersister.swift for 0.0.124.
1 parent 1bb06d3 commit c28c2ac

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

xcode/LDKFramework/DirectlyLinkedBindingsApp/app-batteries/RegtestChannelManagerPersister.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ class RegtestChannelManagerPersister : Persister, ExtendedChannelManagerPersiste
1818
super.init()
1919
}
2020

21-
func handleEvent(event: Event) {
21+
func handleEvent(event: Event) -> Result_NoneReplayEventZ {
2222
privateHandleEvent(event: event)
2323
}
2424

25-
private func privateHandleEvent(event: Event) {
25+
private func privateHandleEvent(event: Event) -> Result_NoneReplayEventZ {
2626
if let spendableOutputEvent = event.getValueAsSpendableOutputs() {
2727

2828
let outputs = spendableOutputEvent.getOutputs()
@@ -31,14 +31,14 @@ class RegtestChannelManagerPersister : Persister, ExtendedChannelManagerPersiste
3131
let destinationScriptHardcoded: [UInt8] = [118,169,20,25,18,157,83,230,49,155,175,25,219,160,89,190,173,22,109,249,10,184,245,136,172]
3232

3333
guard let result = self.keysManager?.asOutputSpender().spendSpendableOutputs(descriptors: outputs, outputs: [], changeDestinationScript: destinationScriptHardcoded, feerateSatPer1000Weight: UInt32(fastFeerate), locktime: nil) else {
34-
return
34+
return .initWithErr(e: ReplayEvent())
3535
}
3636

3737
if let transaction = result.getValue() {
3838
// sendEvent(eventName: MARKER_BROADCAST, eventBody: ["txhex": bytesToHex(bytes: transaction)])
3939
}
4040

41-
return
41+
return .initWithOk()
4242

4343
}else if let paymentSentEvent = event.getValueAsPaymentSent() {
4444
// print what needs printing
@@ -81,6 +81,8 @@ class RegtestChannelManagerPersister : Persister, ExtendedChannelManagerPersiste
8181
})
8282
task.resume()
8383
}
84+
85+
return .initWithOk()
8486
}
8587

8688
override func persistManager(channelManager: Bindings.ChannelManager) -> Bindings.Result_NoneIOErrorZ {

0 commit comments

Comments
 (0)