]> git.bitcoin.ninja Git - ldk-c-bindings/commitdiff
Switch to using the Prob. Scorer in the C++ demo
authorMatt Corallo <git@bluematt.me>
Wed, 23 Mar 2022 00:54:19 +0000 (00:54 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 23 Mar 2022 00:59:44 +0000 (00:59 +0000)
lightning-c-bindings/demo.cpp

index 3b0c437392e4b77da6f7490ab15654dc85663064..08bf66edfb72fefb669fc53dc452ef0de269774e 100644 (file)
@@ -864,8 +864,8 @@ int main() {
                .find_route = custom_find_route,
                .free = NULL,
        };
-       LDK::Scorer scorer = Scorer_default();
-       LDK::MultiThreadedLockableScore scorer_mtx = MultiThreadedLockableScore_new(Scorer_as_Score(&scorer));
+       LDK::ProbabilisticScorer scorer = ProbabilisticScorer_new(ProbabilisticScoringParameters_default(), &net_graph1);
+       LDK::MultiThreadedLockableScore scorer_mtx = MultiThreadedLockableScore_new(ProbabilisticScorer_as_Score(&scorer));
        EventQueue queue1;
        LDKEventHandler handler1 = { .this_arg = &queue1, .handle_event = handle_event, .free = NULL };
        LDK::InvoicePayer payer = InvoicePayer_new(ChannelManager_as_Payer(&cm1), sending_router, &scorer_mtx, logger1, handler1, RetryAttempts_new(0));