]> git.bitcoin.ninja Git - ldk-java/commitdiff
[Java] Update tests to match 0.0.109 API
authorMatt Corallo <git@bluematt.me>
Fri, 1 Jul 2022 21:57:19 +0000 (21:57 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 1 Jul 2022 22:06:43 +0000 (22:06 +0000)
src/test/java/org/ldk/HumanObjectPeerTest.java
src/test/java/org/ldk/PeerTest.java

index 4e90f4cd164aae5445c0fbcedf07ec0d344b9a29..3051239816e5bce07ebac9432cb285b18f1731eb 100644 (file)
@@ -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();
index ec3f92f7ec1ccc8c98c4195411bfeb5fa901a26a..3ed0fb512a2f6cad5c93b0d9fb6e41808149bae3 100644 (file)
@@ -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);