Skip to content

Commit e7f34e7

Browse files
committed
Test function returning Option::None returns null to Java
1 parent 9fefbf1 commit e7f34e7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/java/org/ldk/HumanObjectPeerTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,10 @@ TestState do_test_message_handler() throws InterruptedException {
615615
Result_NoneAPIErrorZ cc_res = peer1.chan_manager.create_channel(peer2.node_id, 100000, 1000, 42, null);
616616
assert cc_res instanceof Result_NoneAPIErrorZ.Result_NoneAPIErrorZ_OK;
617617

618+
// Previously, this was a SEGFAULT instead of get_funding_txo() returning null.
619+
ChannelDetails pre_funding_chan = peer1.chan_manager.list_channels()[0];
620+
assert pre_funding_chan.get_funding_txo() == null;
621+
618622
Event[] events = peer1.get_manager_events(1, peer1, peer2);
619623
assert events[0] instanceof Event.FundingGenerationReady;
620624
assert ((Event.FundingGenerationReady) events[0]).channel_value_satoshis == 100000;

0 commit comments

Comments
 (0)