1 diff --git a/src/main/java/org/ldk/structs/ChannelMonitor.java b/src/main/java/org/ldk/structs/ChannelMonitor.java
2 index c9b5444e..6bd1811d 100644
3 --- a/src/main/java/org/ldk/structs/ChannelMonitor.java
4 +++ b/src/main/java/org/ldk/structs/ChannelMonitor.java
5 @@ -30,6 +30,7 @@ public class ChannelMonitor extends CommonBase {
6 ChannelMonitor(Object _dummy, long ptr) { super(ptr); }
7 @Override @SuppressWarnings("deprecation")
8 protected void finalize() throws Throwable {
9 +System.err.println("Finalizing a ChannelMonitor - " + this);
11 if (ptr != 0) { bindings.ChannelMonitor_free(ptr); }
13 diff --git a/src/test/java/org/ldk/HumanObjectPeerTest.java b/src/test/java/org/ldk/HumanObjectPeerTest.java
14 index 6e90c61..9fcfcfb 100644
15 --- a/src/test/java/org/ldk/HumanObjectPeerTest.java
16 +++ b/src/test/java/org/ldk/HumanObjectPeerTest.java
17 @@ -232,12 +232,21 @@ class HumanObjectPeerTestInstance {
20 public Result_NoneChannelMonitorUpdateErrZ update_persisted_channel(OutPoint id, ChannelMonitorUpdate update, ChannelMonitor data, MonitorUpdateId update_id) {
21 + String key = Arrays.toString(id.to_channel_id());
22 +System.err.println(data);
23 + byte[] mon_data = data.write();
24 + byte[] mon_data2 = data.write();
25 + byte[] mon_data3 = data.write();
27 + Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ roundtrip_monitor = UtilMethods.C2Tuple_BlockHashChannelMonitorZ_read(data.write(), keys_interface);
28 +System.err.println("YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
29 + assert roundtrip_monitor instanceof Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_OK;
30 + ChannelMonitor used_mon = ((Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_OK) roundtrip_monitor).res.get_b();
31 synchronized (monitors) {
32 - String key = Arrays.toString(id.to_channel_id());
33 - assert monitors.put(key, data) != null;
34 - TwoTuple_OutPointScriptZ res = test_mon_roundtrip(data);
35 - assert Arrays.equals(res.get_a().get_txid(), id.get_txid());
36 - assert res.get_a().get_index() == id.get_index();
37 + assert monitors.put(key, used_mon) != null;
38 + //TwoTuple_OutPointScriptZ res = test_mon_roundtrip(data);
39 + //assert Arrays.equals(res.get_a().get_txid(), id.get_txid());
40 + //assert res.get_a().get_index() == id.get_index();
42 return Result_NoneChannelMonitorUpdateErrZ.ok();
44 @@ -1080,10 +1089,19 @@ public class HumanObjectPeerTest {
47 public void test_message_handler() throws InterruptedException {
51 + System.runFinalization();
54 + } catch (InterruptedException e) {}
56 + }, "GCForceThread").start();
57 for (int i = 0; i < (1 << 9) - 1; i++) {
58 boolean nice_close = (i & (1 << 0)) != 0;
59 boolean use_km_wrapper = (i & (1 << 1)) != 0;
60 - boolean use_manual_watch = (i & (1 << 2)) != 0;
61 + boolean use_manual_watch = false;
62 boolean reload_peers = (i & (1 << 3)) != 0;
63 boolean break_cross_refs = (i & (1 << 4)) != 0;
64 boolean use_ignoring_routing_handler = (i & (1 << 5)) != 0;