]> git.bitcoin.ninja Git - ldk-java/commitdiff
Update tests to latest upstream
authorMatt Corallo <git@bluematt.me>
Sat, 6 Mar 2021 00:41:55 +0000 (19:41 -0500)
committerMatt Corallo <git@bluematt.me>
Sat, 6 Mar 2021 00:45:34 +0000 (19:45 -0500)
src/main/java/org/ldk/batteries/ChannelManagerConstructor.java
src/test/java/org/ldk/HumanObjectPeerTest.java
src/test/java/org/ldk/PeerTest.java

index 2a23d7186da3a5f53d8a9dbe3748f4367afac254..f8e3484b7e0b7b74779833f2a1e232a79dd13adc 100644 (file)
@@ -71,8 +71,7 @@ public class ChannelManagerConstructor {
         channel_monitors = new TwoTuple[0];
         channel_manager_latest_block_hash = null;
         this.chain_watch = chain_watch;
-        // Note that current_blockchain_tip_hash will be required in a future version but is currently unused.
-        channel_manager = ChannelManager.constructor_new(network, fee_estimator, chain_watch, tx_broadcaster, logger, keys_interface, config, current_blockchain_tip_height);
+        channel_manager = ChannelManager.constructor_new(fee_estimator, chain_watch, tx_broadcaster, logger, keys_interface, config, network, current_blockchain_tip_hash, current_blockchain_tip_height);
     }
 
     /**
index 548d5e2b7555a5ad0f56163cdd6ac4f0e1d1f6cc..cb79ff664310b7e934d88e4b63ee203129903fa8 100644 (file)
@@ -249,7 +249,7 @@ class HumanObjectPeerTestInstance {
         }
         Peer(byte seed) {
             this(null, seed);
-            this.chan_manager = ChannelManager.constructor_new(LDKNetwork.LDKNetwork_Bitcoin, FeeEstimator.new_impl(confirmation_target -> 0), chain_watch, tx_broadcaster, logger, this.keys_interface, UserConfig.constructor_default(), 1);
+            this.chan_manager = ChannelManager.constructor_new(FeeEstimator.new_impl(confirmation_target -> 0), chain_watch, tx_broadcaster, logger, this.keys_interface, UserConfig.constructor_default(), LDKNetwork.LDKNetwork_Bitcoin, new byte[32], 1);
             this.node_id = chan_manager.get_our_node_id();
             this.chan_manager_events = chan_manager.as_EventsProvider();
 
index c907305a2d0b873aea137101d7438e82e8940dc6..bfb85754fd45330b9b84d535cae1fec9d2281cbf 100644 (file)
@@ -93,7 +93,8 @@ public class PeerTest {
             this.keys = bindings.KeysManager_new(key_seed, System.currentTimeMillis() / 1000, (int)(System.currentTimeMillis() * 1000) & 0xffffffff);
             this.keys_interface = bindings.KeysManager_as_KeysInterface(keys);
             this.config = bindings.UserConfig_default();
-            this.chan_manager = bindings.ChannelManager_new(LDKNetwork.LDKNetwork_Bitcoin, fee_estimator, chain_monitor, tx_broadcaster, logger, keys_interface, config, 1);
+            long params = bindings.ChainParameters_new(LDKNetwork.LDKNetwork_Bitcoin, new byte[32], 1);
+            this.chan_manager = bindings.ChannelManager_new(fee_estimator, chain_monitor, tx_broadcaster, logger, keys_interface, config, params);
             this.node_id = bindings.ChannelManager_get_our_node_id(chan_manager);
             this.chan_manager_events = bindings.ChannelManager_as_EventsProvider(chan_manager);