Skip to content

Commit 4809fcd

Browse files
authored
Merge pull request #104 from lightningdevkit/release-0.0.114
Release 0.0.114
2 parents 77bcbb4 + 3eea818 commit 4809fcd

File tree

124 files changed

+192
-35
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+192
-35
lines changed

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// swift-tools-version:5.3
22
import PackageDescription
33

4-
let tag = "0.0.113"
5-
let checksum = "b8969da1e7556b7780deed6dcd18510f46b4b44bceccaffd10335d980e34789a"
4+
let tag = "0.0.114"
5+
let checksum = "3fec857cc975f792da0d2a5c9e9c0b604d780b81888a607175e9e0d6c209fc43"
66
let url = "https://github.com/lightningdevkit/ldk-swift/releases/download/\(tag)/LightningDevKit.xcframework.zip"
77

88
let package = Package(

ci/LDKSwift/Tests/LDKSwiftTests/HumanObjectPeerTestInstance.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public class HumanObjectPeerTestInstance {
2020
public var useFilter: Bool = false;
2121
public var useRouter: Bool = false;
2222
public var shouldRecipientRejectPayment: Bool = false;
23+
public var ephemeralNetworkGraphForScorer: Bool = false
2324

2425
// public var nice_close: Bool = false;
2526
// public var use_km_wrapper: Bool = false;
@@ -29,7 +30,7 @@ public class HumanObjectPeerTestInstance {
2930
// public var use_nio_peer_handler: Bool = false;
3031

3132
private class func listCustomizeableProperties() -> [String] {
32-
return ["useFilter", "useRouter", "shouldRecipientRejectPayment"]
33+
return ["useFilter", "useRouter", "shouldRecipientRejectPayment", "ephemeralNetworkGraphForScorer"]
3334
}
3435

3536
public class func combinationCount() -> UInt {
@@ -301,9 +302,13 @@ public class HumanObjectPeerTestInstance {
301302
// channel manager constructor is mandatory
302303

303304
let graph = NetworkGraph(network: .Regtest, logger: self.logger)
305+
var scorerGraph = graph
306+
if master.configuration.ephemeralNetworkGraphForScorer {
307+
scorerGraph = NetworkGraph(network: .Regtest, logger: self.logger)
308+
}
304309

305310
let scoringParams = ProbabilisticScoringParameters.initWithDefault()
306-
let probabalisticScorer = ProbabilisticScorer(params: scoringParams, networkGraph: graph, logger: self.logger)
311+
let probabalisticScorer = ProbabilisticScorer(params: scoringParams, networkGraph: scorerGraph, logger: self.logger)
307312
let score = probabalisticScorer.asScore()
308313
let multiThreadedScorer = MultiThreadedLockableScore(score: score)
309314

ci/LDKSwift/Tests/LDKSwiftTests/LDKSwiftTests.swift

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,10 @@ class LDKSwiftTests: XCTestCase {
456456
print("Running test with flags \(i)");
457457

458458
let config = HumanObjectPeerTestInstance.Configuration()
459+
460+
// We have a set of configuration properties. We run through all possible
461+
// combinations, and set each individual property depending on whether
462+
// its bit is set.
459463

460464
config.shouldRecipientRejectPayment = (i & (1 << 0)) != 0
461465
print("shouldRecipientRejectPayment: \(config.shouldRecipientRejectPayment)")
@@ -465,26 +469,9 @@ class LDKSwiftTests: XCTestCase {
465469

466470
config.useRouter = (i & (1 << 2)) != 0
467471
print("useRouter: \(config.useRouter)")
468-
469-
/*
470-
config.nice_close = (i & (1 << 0)) != 0;
471-
config.use_km_wrapper = (i & (1 << 1)) != 0;
472-
config.use_manual_watch = (i & (1 << 2)) != 0;
473-
config.reload_peers = (i & (1 << 3)) != 0;
474-
config.break_cross_peer_refs = (i & (1 << 4)) != 0;
475-
config.use_nio_peer_handler = true // (i & (1 << 5)) != 0;
476-
config.useChannelManagerConstructor = true // (i & (1 << 6)) != 0;
477-
478-
if (config.break_cross_peer_refs && !config.reload_peers) {
479-
// There are no cross refs to break without reloading peers.
480-
continue;
481-
}
482-
483-
if (config.useChannelManagerConstructor && (config.use_manual_watch || !config.use_nio_peer_handler)) {
484-
// ChannelManagerConstructor requires a ChainMonitor as the Watch and creates a NioPeerHandler for us.
485-
continue;
486-
}
487-
*/
472+
473+
config.ephemeralNetworkGraphForScorer = (i & (1 << 3)) != 0
474+
print("ephemeralNetworkGraphForScorer: \(config.ephemeralNetworkGraphForScorer)")
488475

489476
let instance = HumanObjectPeerTestInstance(configuration: config)
490477
await instance.testMessageHandling()

out/VersionDescriptor.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
extension Bindings {
77
public class func getLDKSwiftBindingsSerializationHash() -> String {
8-
return "4e4c947683e196a1ff260544d8a59362f76c3a730149103afdfc9c50ce5092e8"
8+
return "92be83a8fe0801850768cc4441b6ea8e28e28fa4cccc191cdfe4e790d4f0e76d"
99
}
1010
public class func getLDKSwiftBindingsVersion() -> String {
11-
return "0.0.113-25-gba3d23c-dirty"
11+
return "0.0.113-27-g36ac4a5-dirty"
1212
}
1313
public class func getLDKSwiftBindingsCommitHash() -> String {
14-
return "ba3d23c249e05bd9096fdccf995396650c23fa36"
14+
return "36ac4a593252101b0af3c99092fae82c9c173b91"
1515
}
1616
}
1717

out/enums/complex/GossipSync.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@
109109
let returnValue = GossipSync(cType: nativeCallResult)
110110

111111

112-
return returnValue
112+
try! returnValue.addAnchor(anchor: a)
113+
return returnValue
113114
}
114115

115116
/// Utility method to constructs a new Rapid-variant GossipSync
@@ -132,7 +133,8 @@
132133
let returnValue = GossipSync(cType: nativeCallResult)
133134

134135

135-
return returnValue
136+
try! returnValue.addAnchor(anchor: a)
137+
return returnValue
136138
}
137139

138140
/// Utility method to constructs a new None-variant GossipSync

out/enums/complex/Retry.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
///
4545
/// Each attempt may be multiple HTLCs along multiple paths if the router decides to split up a
4646
/// retry, and may retry multiple failed HTLCs at once if they failed around the same time and
47-
/// were retried along a route from a single call to [`Router::find_route`].
47+
/// were retried along a route from a single call to [`Router::find_route_with_id`].
4848
case Attempts
4949

5050
/// Time elapsed before abandoning retries for a payment. At least one attempt at payment is made;

out/structs/AnnouncementSignatures.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@
306306
Self.instanceCounter += 1
307307
self.instanceNumber = Self.instanceCounter
308308
super.init(conflictAvoidingVariableName: 0)
309+
309310

310311
}
311312

out/structs/BackgroundProcessor.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,10 @@
182182
let returnValue = BackgroundProcessor(cType: nativeCallResult)
183183

184184

185-
return returnValue
185+
try! returnValue.addAnchor(anchor: chainMonitor)
186+
try! returnValue.addAnchor(anchor: channelManager)
187+
try! returnValue.addAnchor(anchor: peerManager)
188+
return returnValue
186189
}
187190

188191
/// Join `BackgroundProcessor`'s thread, returning any error that occurred while persisting

out/structs/BestBlock.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@
161161
Self.instanceCounter += 1
162162
self.instanceNumber = Self.instanceCounter
163163
super.init(conflictAvoidingVariableName: 0)
164+
164165

165166
}
166167

out/structs/BigSize.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@
142142
Self.instanceCounter += 1
143143
self.instanceNumber = Self.instanceCounter
144144
super.init(conflictAvoidingVariableName: 0)
145+
145146

146147
}
147148

0 commit comments

Comments
 (0)