]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Merge pull request #1119 from TheBlueMatt/2021-10-less-aggressive-htlc-timeouts
authorMatt Corallo <649246+TheBlueMatt@users.noreply.github.com>
Tue, 16 Nov 2021 16:18:20 +0000 (16:18 +0000)
committerGitHub <noreply@github.com>
Tue, 16 Nov 2021 16:18:20 +0000 (16:18 +0000)
Be less aggressive in outbound HTLC CLTV timeout checks

1  2 
lightning/src/chain/channelmonitor.rs
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_tests.rs

Simple merge
Simple merge
Simple merge
index 5e87aaff3c40a93c67ddcf012a67098a33d427b7,5c5a2f2af4469111a13c3ad12948f5f257e533e2..118bb1497d8f20a833a2c7273e56a25c81b4dea7
@@@ -3991,10 -4048,15 +3991,10 @@@ fn do_test_holding_cell_htlc_add_timeou
                nodes[1].node.handle_update_add_htlc(&nodes[0].node.get_our_node_id(), &payment_event.msgs[0]);
                commitment_signed_dance!(nodes[1], nodes[0], payment_event.commitment_msg, false);
                expect_pending_htlcs_forwardable!(nodes[1]);
 -              check_added_monitors!(nodes[1], 0);
 -      } else {
 -              let net_graph_msg_handler = &nodes[1].net_graph_msg_handler;
 -              let route = get_route(&nodes[1].node.get_our_node_id(), &net_graph_msg_handler.network_graph, &nodes[2].node.get_our_node_id(), Some(InvoiceFeatures::known()), None, &Vec::new(), 100000, TEST_FINAL_CLTV, &logger).unwrap();
 -              nodes[1].node.send_payment(&route, second_payment_hash, &Some(second_payment_secret)).unwrap();
 -              check_added_monitors!(nodes[1], 0);
        }
 +      check_added_monitors!(nodes[1], 0);
  
-       connect_blocks(&nodes[1], TEST_FINAL_CLTV - CLTV_CLAIM_BUFFER - LATENCY_GRACE_PERIOD_BLOCKS);
+       connect_blocks(&nodes[1], TEST_FINAL_CLTV - LATENCY_GRACE_PERIOD_BLOCKS);
        assert!(nodes[1].node.get_and_clear_pending_msg_events().is_empty());
        assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
        connect_blocks(&nodes[1], 1);