]> git.bitcoin.ninja Git - ldk-java/commitdiff
Test function returning Option::None returns null to Java
authorMatt Corallo <git@bluematt.me>
Fri, 6 Aug 2021 18:52:57 +0000 (18:52 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 9 Aug 2021 05:53:31 +0000 (05:53 +0000)
src/test/java/org/ldk/HumanObjectPeerTest.java

index 518c84fd921197abc4e7e519bdb8a19be78328ed..f903c3fbb8b7138227aa5b10146cf970ed50c64f 100644 (file)
@@ -615,6 +615,10 @@ class HumanObjectPeerTestInstance {
         Result_NoneAPIErrorZ cc_res = peer1.chan_manager.create_channel(peer2.node_id, 100000, 1000, 42, null);
         assert cc_res instanceof Result_NoneAPIErrorZ.Result_NoneAPIErrorZ_OK;
 
+        // Previously, this was a SEGFAULT instead of get_funding_txo() returning null.
+        ChannelDetails pre_funding_chan = peer1.chan_manager.list_channels()[0];
+        assert pre_funding_chan.get_funding_txo() == null;
+
         Event[] events = peer1.get_manager_events(1, peer1, peer2);
         assert events[0] instanceof Event.FundingGenerationReady;
         assert ((Event.FundingGenerationReady) events[0]).channel_value_satoshis == 100000;