Skip to content

Commit 1cb8b67

Browse files
committed
Update demo.cpp to match updated 0.0.108-bindings API
1 parent 45ad332 commit 1cb8b67

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lightning-c-bindings/demo.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,7 @@ struct LDKCResult_RouteLightningErrorZ custom_find_route(const void *this_arg, s
444444
const struct CustomRouteFinderParams *params = (struct CustomRouteFinderParams *)this_arg;
445445
assert(first_hops->datalen == 1);
446446
assert(ChannelDetails_get_is_usable(&first_hops->data[0]));
447-
LDK::ReadOnlyNetworkGraph graph_lock = NetworkGraph_read_only(params->graph_ref);
448-
return find_route(payer, route_params, &graph_lock, first_hops, *params->logger, scorer, &params->random_seed_bytes.data);
447+
return find_route(payer, route_params, params->graph_ref, first_hops, *params->logger, scorer, &params->random_seed_bytes.data);
449448
}
450449

451450
int main() {
@@ -715,9 +714,8 @@ int main() {
715714
}, Invoice_route_hints(invoice->contents.result), COption_u64Z_none(), 0xffffffff),
716715
5000, Invoice_min_final_cltv_expiry(invoice->contents.result));
717716
random_bytes = keys_source1->get_secure_random_bytes(keys_source1->this_arg);
718-
LDK::ReadOnlyNetworkGraph graph_lock = NetworkGraph_read_only(&net_graph2);
719717

720-
LDK::CResult_RouteLightningErrorZ route = find_route(ChannelManager_get_our_node_id(&cm1), &route_params, &graph_lock, &outbound_channels, logger1, &chan_scorer, &random_bytes.data);
718+
LDK::CResult_RouteLightningErrorZ route = find_route(ChannelManager_get_our_node_id(&cm1), &route_params, &net_graph2, &outbound_channels, logger1, &chan_scorer, &random_bytes.data);
721719

722720
assert(route->result_ok);
723721
LDK::CVec_CVec_RouteHopZZ paths = Route_get_paths(route->contents.result);

0 commit comments

Comments
 (0)