From: Matt Corallo Date: Fri, 30 Sep 2022 01:05:59 +0000 (+0000) Subject: [TS] Update typescript tests to latest upstream API X-Git-Tag: v0.0.111.0^2~4 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=fcd77e9d9d1227cfe3d26b8bdebbe2fb2aa76354;p=ldk-java [TS] Update typescript tests to latest upstream API --- diff --git a/node-net/test/test.mts b/node-net/test/test.mts index 8d493e4d..86b6b3a2 100644 --- a/node-net/test/test.mts +++ b/node-net/test/test.mts @@ -25,8 +25,9 @@ const rng_seed = new Uint8Array(32); const routing_handler = ldk.IgnoringMessageHandler.constructor_new().as_RoutingMessageHandler(); const chan_handler = ldk.ErroringMessageHandler.constructor_new().as_ChannelMessageHandler(); const cust_handler = ldk.IgnoringMessageHandler.constructor_new().as_CustomMessageHandler(); +const onion_handler = ldk.IgnoringMessageHandler.constructor_new().as_OnionMessageHandler(); -const a_pm = ldk.PeerManager.constructor_new(chan_handler, routing_handler, node_a_secret, rng_seed, logger_a, cust_handler); +const a_pm = ldk.PeerManager.constructor_new(chan_handler, routing_handler, onion_handler, node_a_secret, 0xdeadbeefn, rng_seed, logger_a, cust_handler); const a_net_handler = new node_net.NodeLDKNet(a_pm); var port = 10000; for (; port < 11000; port++) { @@ -37,7 +38,7 @@ for (; port < 11000; port++) { } catch(_) {} } -const b_pm = ldk.PeerManager.constructor_new(chan_handler, routing_handler, node_b_secret, rng_seed, logger_b, cust_handler); +const b_pm = ldk.PeerManager.constructor_new(chan_handler, routing_handler, onion_handler, node_b_secret, 0xdeadbeefn, rng_seed, logger_b, cust_handler); const b_net_handler = new node_net.NodeLDKNet(b_pm); await b_net_handler.connect_peer("127.0.0.1", port, node_a_pk); diff --git a/ts/test/tests.mts b/ts/test/tests.mts index a8edeacc..0b1b3ee0 100644 --- a/ts/test/tests.mts +++ b/ts/test/tests.mts @@ -212,8 +212,8 @@ tests.push(async () => { const b = get_chanman(); const ignorer = ldk.IgnoringMessageHandler.constructor_new(); - const pm_a = ldk.PeerManager.constructor_new(a.chan_man.as_ChannelMessageHandler(), ignorer.as_RoutingMessageHandler(), a.node_secret, a.node_secret, a.logger, ignorer.as_CustomMessageHandler()); - const pm_b = ldk.PeerManager.constructor_new(b.chan_man.as_ChannelMessageHandler(), ignorer.as_RoutingMessageHandler(), b.node_secret, b.node_secret, b.logger, ignorer.as_CustomMessageHandler()); + const pm_a = ldk.PeerManager.constructor_new(a.chan_man.as_ChannelMessageHandler(), ignorer.as_RoutingMessageHandler(), ignorer.as_OnionMessageHandler(), a.node_secret, 0xdeadbeefn, a.node_secret, a.logger, ignorer.as_CustomMessageHandler()); + const pm_b = ldk.PeerManager.constructor_new(b.chan_man.as_ChannelMessageHandler(), ignorer.as_RoutingMessageHandler(), ignorer.as_OnionMessageHandler(), b.node_secret, 0xdeadbeefn, b.node_secret, b.logger, ignorer.as_CustomMessageHandler()); var sock_b: ldk.SocketDescriptor; const sock_a = ldk.SocketDescriptor.new_impl({