Skip to content

Commit f98080e

Browse files
committed
Update manually written files for 0.0.115.
1 parent 19f248d commit f98080e

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

ci/LDKSwift/Tests/LDKSwiftTests/HumanObjectPeerTestInstance.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -726,8 +726,7 @@ public class HumanObjectPeerTestInstance {
726726
"payment_hash": paymentPathFailed.getPaymentHash(),
727727
"payment_failed_permanently": paymentPathFailed.getPaymentFailedPermanently(),
728728
"short_channel_id": paymentPathFailed.getShortChannelId(),
729-
"path": paymentPathFailed.getPath().map { $0.getShortChannelId() },
730-
"retry": paymentPathFailed.getRetry(),
729+
"path": paymentPathFailed.getPath().getHops().map { $0.getShortChannelId() },
731730
"failure": paymentPathFailed.getFailure()
732731
]
733732

@@ -748,7 +747,7 @@ public class HumanObjectPeerTestInstance {
748747
}
749748
let paymentSent = paymentSentEvent.getValueAsPaymentSent()!
750749
let paymentPathSuccessful = paymentPathSuccessfulEvent.getValueAsPaymentPathSuccessful()!
751-
print("sent payment \(paymentSent.getPaymentId()) with fee \(paymentSent.getFeePaidMsat()) via \(paymentPathSuccessful.getPath().map { h in h.getShortChannelId() })")
750+
print("sent payment \(paymentSent.getPaymentId()) with fee \(paymentSent.getFeePaidMsat()) via \(paymentPathSuccessful.getPath().getHops().map { h in h.getShortChannelId() })")
752751
}
753752

754753
var currentChannelABalance = originalChannelBalanceAToB
@@ -846,7 +845,7 @@ public class HumanObjectPeerTestInstance {
846845
let paymentClaimed = paymentClaimedEvent.getValueAsPaymentClaimed()!
847846
let paymentSent = paymentSentEvent.getValueAsPaymentSent()!
848847
let paymentPathSuccessful = paymentPathSuccessfulEvent.getValueAsPaymentPathSuccessful()!
849-
print("sent payment \(paymentSent.getPaymentId()) worth \(paymentClaimed.getAmountMsat()) with fee \(paymentSent.getFeePaidMsat()) via \(paymentPathSuccessful.getPath().map { h in h.getShortChannelId() })")
848+
print("sent payment \(paymentSent.getPaymentId()) worth \(paymentClaimed.getAmountMsat()) with fee \(paymentSent.getFeePaidMsat()) via \(paymentPathSuccessful.getPath().getHops().map { h in h.getShortChannelId() })")
850849
}
851850

852851
var currentChannelABalance = prePaymentBalanceAToB

ci/LDKSwift/Tests/LDKSwiftTests/LDKSwiftTests.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ class LDKSwiftTests: XCTestCase {
346346
cltvExpiryDeltaArg: finalCltvValue
347347
)
348348

349-
var path: [RouteHop] = [routeHop]
349+
var hops: [RouteHop] = [routeHop]
350350

351351
for _ in 0..<3 {
352352

@@ -358,10 +358,12 @@ class LDKSwiftTests: XCTestCase {
358358
feeMsatArg: paymentValueMsat,
359359
cltvExpiryDeltaArg: finalCltvValue
360360
)
361-
path.append(extraHop)
361+
hops.append(extraHop)
362362
}
363363

364364
let paymentParams = PaymentParameters.initForKeysend(payeePubkey: Self.hexStringToBytes(hexString: destPubkeyHex)!, finalCltvExpiryDelta: 3)
365+
let blindedTail = BlindedTail(hopsArg: [], blindingPointArg: [], excessFinalCltvExpiryDeltaArg: 0, finalValueMsatArg: 0)
366+
let path = Path(hopsArg: hops, blindedTailArg: blindedTail)
365367
let route = Route(pathsArg: [path], paymentParamsArg: paymentParams)
366368
}
367369

@@ -388,7 +390,7 @@ class LDKSwiftTests: XCTestCase {
388390
let gossipDataRaw = [UInt8](data)
389391
print("Applying rapid sync data…")
390392
let startB = DispatchTime.now()
391-
let timestamp = rapidSync.updateNetworkGraph(updateData: gossipDataRaw)
393+
let timestamp = rapidSync.updateNetworkGraphNoStd(updateData: gossipDataRaw, currentTimeUnix: nil)
392394
if let error = timestamp.getError() {
393395
print("error! type: \(error.getValueType())")
394396
let specificError = error.getValueAsLightningError()
@@ -441,7 +443,7 @@ class LDKSwiftTests: XCTestCase {
441443
print("found route with \(paths.count) paths!")
442444
for currentPath in paths {
443445
print("\nPath Option:")
444-
for currentHop in currentPath {
446+
for currentHop in currentPath.getHops() {
445447
print("scid: \(currentHop.getShortChannelId()), pubkey: \(currentHop.getPubkey()), fee (msat): \(currentHop.getFeeMsat()), CLTV delta: \(currentHop.getCltvExpiryDelta())")
446448
}
447449
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public class PolarIntegrationSample {
218218
guard let paymentPathSuccessful = paymentPathSuccessfulEvent.getValueAsPaymentPathSuccessful() else {
219219
throw TestFlowExceptions.paymentPathUnsuccessful
220220
}
221-
print("sent payment \(paymentSent.getPaymentId()) with fee \(paymentSent.getFeePaidMsat()) via \(paymentPathSuccessful.getPath().map { h in h.getShortChannelId() })")
221+
print("sent payment \(paymentSent.getPaymentId()) with fee \(paymentSent.getFeePaidMsat()) via \(paymentPathSuccessful.getPath().getHops().map { h in h.getShortChannelId() })")
222222
}
223223

224224
for i in 0...600 {

0 commit comments

Comments
 (0)