@@ -164,8 +164,8 @@ class LDKSwiftTests: XCTestCase {
164164 let config = UserConfig . initWithDefault ( )
165165 let networkGraph = NetworkGraph ( network: . Bitcoin, logger: logger)
166166
167- let scoringParams = ProbabilisticScoringParameters . initWithDefault ( )
168- let probabalisticScorer = ProbabilisticScorer ( params : scoringParams , networkGraph: networkGraph, logger: logger)
167+ let decayParams = ProbabilisticScoringDecayParameters . initWithDefault ( )
168+ let probabalisticScorer = ProbabilisticScorer ( decayParams : decayParams , networkGraph: networkGraph, logger: logger)
169169 let score = probabalisticScorer. asScore ( )
170170 let multiThreadedScorer = MultiThreadedLockableScore ( score: score)
171171
@@ -212,8 +212,8 @@ class LDKSwiftTests: XCTestCase {
212212 let lightningNetwork = LDKNetwork_Bitcoin
213213 let networkGraph = NetworkGraph ( network: . Bitcoin, logger: logger)
214214
215- let scoringParams = ProbabilisticScoringParameters . initWithDefault ( )
216- let probabalisticScorer = ProbabilisticScorer ( params : scoringParams , networkGraph: networkGraph, logger: logger)
215+ let decayParams = ProbabilisticScoringDecayParameters . initWithDefault ( )
216+ let probabalisticScorer = ProbabilisticScorer ( decayParams : decayParams , networkGraph: networkGraph, logger: logger)
217217 let score = probabalisticScorer. asScore ( )
218218 let multiThreadedScorer = MultiThreadedLockableScore ( score: score)
219219
@@ -270,8 +270,8 @@ class LDKSwiftTests: XCTestCase {
270270 let lightningNetwork : Bindings . Network = . Bitcoin
271271 let networkGraph = NetworkGraph ( network: . Bitcoin, logger: logger)
272272
273- let scoringParams = ProbabilisticScoringParameters . initWithDefault ( )
274- let probabalisticScorer = ProbabilisticScorer ( params : scoringParams , networkGraph: networkGraph, logger: logger)
273+ let decayParams = ProbabilisticScoringDecayParameters . initWithDefault ( )
274+ let probabalisticScorer = ProbabilisticScorer ( decayParams : decayParams , networkGraph: networkGraph, logger: logger)
275275 let score = probabalisticScorer. asScore ( )
276276 let multiThreadedScorer = MultiThreadedLockableScore ( score: score)
277277
@@ -410,8 +410,8 @@ class LDKSwiftTests: XCTestCase {
410410 print("Network graph size: \(graphBytes.count)! Time: \(elapsedC)s")
411411 */
412412
413- let scoringParams = ProbabilisticScoringParameters . initWithDefault ( )
414- let scorer = ProbabilisticScorer ( params : scoringParams , networkGraph: networkGraph, logger: logger)
413+ let decayParams = ProbabilisticScoringDecayParameters . initWithDefault ( )
414+ let scorer = ProbabilisticScorer ( decayParams : decayParams , networkGraph: networkGraph, logger: logger)
415415 let score = scorer. asScore ( )
416416 // let lockableScore = LockableScore()
417417 // let defaultRouter = DefaultRouter(network_graph: networkGraph, logger: logger, random_seed_bytes: [UInt8](repeating: 0, count: 32), scorer: lockableScore)
@@ -432,7 +432,8 @@ class LDKSwiftTests: XCTestCase {
432432 let firstHops : [ ChannelDetails ] ? = nil
433433 print ( " STEP B " )
434434 let randomSeedBytes : [ UInt8 ] = [ UInt8] ( repeating: 0 , count: 32 )
435- let foundRoute = Bindings . findRoute ( ourNodePubkey: payerPubkey, routeParams: routeParameters, networkGraph: networkGraph, firstHops: [ ] , logger: logger, scorer: score, randomSeedBytes: randomSeedBytes)
435+ let scoreParams = ProbabilisticScoringFeeParameters . initWithDefault ( ) ;
436+ let foundRoute = Bindings . findRoute ( ourNodePubkey: payerPubkey, routeParams: routeParameters, networkGraph: networkGraph, firstHops: [ ] , logger: logger, scorer: score, scoreParams: scoreParams, randomSeedBytes: randomSeedBytes)
436437// let foundRoute = router.find_route(payer: payerPubkey, route_params: routeParameters, payment_hash: nil, first_hops: firstHops, inflight_htlcs: <#T##InFlightHtlcs#>)
437438
438439 if let routeError = foundRoute. getError ( ) {
0 commit comments