From: Matt Corallo Date: Fri, 6 Aug 2021 18:52:57 +0000 (+0000) Subject: Test function returning Option::None returns null to Java X-Git-Tag: v0.0.99.2~6 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=e7f34e7b879ef2f428ffffff5a0a05ecd4d709e5;p=ldk-java Test function returning Option::None returns null to Java --- diff --git a/src/test/java/org/ldk/HumanObjectPeerTest.java b/src/test/java/org/ldk/HumanObjectPeerTest.java index 518c84fd..f903c3fb 100644 --- a/src/test/java/org/ldk/HumanObjectPeerTest.java +++ b/src/test/java/org/ldk/HumanObjectPeerTest.java @@ -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;