From 8b1d66cd42ff365741d15affe4d945f856fa3ee8 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 1 Jul 2022 21:57:19 +0000 Subject: [PATCH] [Java] Update tests to match 0.0.109 API --- src/test/java/org/ldk/HumanObjectPeerTest.java | 8 ++++---- src/test/java/org/ldk/PeerTest.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/java/org/ldk/HumanObjectPeerTest.java b/src/test/java/org/ldk/HumanObjectPeerTest.java index 4e90f4cd..30512398 100644 --- a/src/test/java/org/ldk/HumanObjectPeerTest.java +++ b/src/test/java/org/ldk/HumanObjectPeerTest.java @@ -170,10 +170,10 @@ class HumanObjectPeerTestInstance { } UserConfig get_config() { - ChannelConfig channel_config = ChannelConfig.with_default(); + ChannelHandshakeConfig channel_config = ChannelHandshakeConfig.with_default(); channel_config.set_announced_channel(true); UserConfig config = UserConfig.with_default(); - config.set_channel_options(channel_config); + config.set_channel_handshake_config(channel_config); return config; } @@ -855,7 +855,7 @@ class HumanObjectPeerTestInstance { InvoiceFeatures invoice_features = ((Result_InvoiceSignOrCreationErrorZ.Result_InvoiceSignOrCreationErrorZ_OK) invoice).res.features(); RouteHint[] route_hints = ((Result_InvoiceSignOrCreationErrorZ.Result_InvoiceSignOrCreationErrorZ_OK) invoice).res.route_hints(); - PaymentParameters payee = PaymentParameters.of(peer2.node_id, invoice_features, route_hints, Option_u64Z.none(), 6*24*14); + PaymentParameters payee = PaymentParameters.of(peer2.node_id, invoice_features, route_hints, Option_u64Z.none(), 6*24*14, (byte)1); RouteParameters route_params = RouteParameters.of(payee, 10000000, 42); Result_RouteLightningErrorZ route_res = UtilMethods.find_route( peer1.chan_manager.get_our_node_id(), route_params, peer1.router, @@ -974,7 +974,7 @@ class HumanObjectPeerTestInstance { while (state.peer2.broadcast_set.size() != 1) state.peer2.broadcast_set.wait(); } } else { - state.peer1.chan_manager.force_close_all_channels(); + state.peer1.chan_manager.force_close_all_channels_broadcasting_latest_txn(); maybe_exchange_peer_messages(state.peer1, state.peer2); synchronized (state.peer1.broadcast_set) { while (state.peer1.broadcast_set.size() != 1) state.peer1.broadcast_set.wait(); diff --git a/src/test/java/org/ldk/PeerTest.java b/src/test/java/org/ldk/PeerTest.java index ec3f92f7..3ed0fb51 100644 --- a/src/test/java/org/ldk/PeerTest.java +++ b/src/test/java/org/ldk/PeerTest.java @@ -317,7 +317,7 @@ public class PeerTest { long no_u64 = bindings.COption_u64Z_none(); long invoice_features = bindings.InvoiceFeatures_known(); - long payee = bindings.PaymentParameters_new(peer2.node_id, invoice_features, new long[0], no_u64, 6*24*14); + long payee = bindings.PaymentParameters_new(peer2.node_id, invoice_features, new long[0], no_u64, 6*24*14, (byte)1); bindings.InvoiceFeatures_free(invoice_features); bindings.COption_u64Z_free(no_u64); long route_params = bindings.RouteParameters_new(payee, 1000, 42); -- 2.30.2