From: Matt Corallo <649246+TheBlueMatt@users.noreply.github.com> Date: Tue, 21 Feb 2023 21:28:05 +0000 (+0000) Subject: Merge pull request #2035 from TheBlueMatt/2023-02-fix-no-con-discon X-Git-Tag: v0.0.114-beta~11 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=e954ee8256a70ee917135f4c03c8726bf305c2fc;p=rust-lightning Merge pull request #2035 from TheBlueMatt/2023-02-fix-no-con-discon Fix (and DRY) the conditionals before calling peer_disconnected --- e954ee8256a70ee917135f4c03c8726bf305c2fc diff --cc lightning/src/ln/payment_tests.rs index 3285cf4d7,4f51d2f81..9a957e372 --- a/lightning/src/ln/payment_tests.rs +++ b/lightning/src/ln/payment_tests.rs @@@ -612,10 -697,9 +612,10 @@@ fn do_test_completed_payment_not_retrya let chan_1_monitor_serialized = get_monitor!(nodes[0], chan_id_3).encode(); nodes_0_serialized = nodes[0].node.encode(); - // Ensure that after reload we cannot retry the payment. + // Check that after reload we can send the payment again (though we shouldn't, since it was + // claimed previously). reload_node!(nodes[0], test_default_channel_config(), nodes_0_serialized, &[&chan_0_monitor_serialized, &chan_1_monitor_serialized], third_persister, third_new_chain_monitor, third_nodes_0_deserialized); - nodes[1].node.peer_disconnected(&nodes[0].node.get_our_node_id(), false); + nodes[1].node.peer_disconnected(&nodes[0].node.get_our_node_id()); reconnect_nodes(&nodes[0], &nodes[1], (false, false), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (false, false));