From: Matt Corallo Date: Mon, 1 Feb 2021 21:08:26 +0000 (-0500) Subject: Add trivial test of a route w/ Features::known, update to upstream X-Git-Tag: v0.0.98~13^2~6 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=346c8b8664a67c94842635b5d000a50406844691;p=ldk-java Add trivial test of a route w/ Features::known, update to upstream --- diff --git a/src/test/java/org/ldk/HumanObjectPeerTest.java b/src/test/java/org/ldk/HumanObjectPeerTest.java index d8d7d2ec..aa79ca6b 100644 --- a/src/test/java/org/ldk/HumanObjectPeerTest.java +++ b/src/test/java/org/ldk/HumanObjectPeerTest.java @@ -113,7 +113,7 @@ class HumanObjectPeerTestInstance { } @Override - public Result_ChanKeySignerDecodeErrorZ read_chan_signer(byte[] reader) { + public Result_ChannelKeysDecodeErrorZ read_chan_signer(byte[] reader) { return underlying_if.read_chan_signer(reader); } }); @@ -531,6 +531,15 @@ class HumanObjectPeerTestInstance { assert payment_res instanceof Result_NonePaymentSendFailureZ.Result_NonePaymentSendFailureZ_OK; wait_events_processed(peer1, peer2); + RouteHop[][] hops = new RouteHop[1][1]; + byte[] hop_pubkey = new byte[33]; + hop_pubkey[0] = 3; + hop_pubkey[1] = 42; + hops[0][0] = RouteHop.constructor_new(hop_pubkey, NodeFeatures.constructor_known(), 42, ChannelFeatures.constructor_known(), 100, 0); + Route r2 = Route.constructor_new(hops); + payment_res = peer1.chan_manager.send_payment(r2, payment_hash, new byte[32]); + assert payment_res instanceof Result_NonePaymentSendFailureZ.Result_NonePaymentSendFailureZ_Err; + assert peer1.get_monitor_events().length == 0; assert peer2.get_monitor_events().length == 0;