Allow users to specify a `UserConfig` when de-ser'ing a ChanManager
[ldk-java] / src / test / java / org / ldk / HumanObjectPeerTest.java
index a123b6e31b270cfcb1820b8adb62425ecf34e5bf..eb3d43f2d08667770461f0081d330608c97129c9 100644 (file)
@@ -174,7 +174,7 @@ class HumanObjectPeerTestInstance {
         NetGraphMsgHandler route_handler;
         final Watch chain_watch;
         final HashSet<String> filter_additions;
-        final Option_FilterZ filter;
+        Option_FilterZ filter;
         ChannelManager chan_manager;
         PeerManager peer_manager;
         final HashMap<String, ChannelMonitor> monitors; // Wow I forgot just how terrible Java is - we can't put a byte array here.
@@ -387,6 +387,7 @@ class HumanObjectPeerTestInstance {
             }
 
             this.node_id = chan_manager.get_our_node_id();
+            this.filter = null;
             bind_nio();
             System.gc();
         }
@@ -403,11 +404,13 @@ class HumanObjectPeerTestInstance {
                         filter_nullable = ((Option_FilterZ.Some) this.filter).some;
                     }
                     if (use_ignore_handler) {
-                        this.constructor = new ChannelManagerConstructor(serialized, monitors, this.keys_interface,
-                                this.fee_estimator, this.chain_monitor, filter_nullable, null, this.tx_broadcaster, this.logger);
+                        this.constructor = new ChannelManagerConstructor(serialized, monitors, UserConfig.with_default(),
+                                this.keys_interface, this.fee_estimator, this.chain_monitor, filter_nullable,
+                                null, this.tx_broadcaster, this.logger);
                     } else {
-                        this.constructor = new ChannelManagerConstructor(serialized, monitors, this.keys_interface,
-                                this.fee_estimator, this.chain_monitor, filter_nullable, this.router, this.tx_broadcaster, this.logger);
+                        this.constructor = new ChannelManagerConstructor(serialized, monitors, UserConfig.with_default(),
+                                this.keys_interface, this.fee_estimator, this.chain_monitor, filter_nullable,
+                                this.router, this.tx_broadcaster, this.logger);
                     }
                     LockableScore scorer = null;
                     if (use_invoice_payer) { scorer = LockableScore.of(Scorer.with_default().as_Score()); }
@@ -493,6 +496,7 @@ class HumanObjectPeerTestInstance {
                 // the ChannelSigner.
                 this.ptr_to = orig.chan_manager;
             }
+            this.filter = null;
         }
 
         TwoTuple_TxidCVec_C2Tuple_u32TxOutZZZ[] connect_block(Block b, int height, long expected_monitor_update_len) {