X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Freorg_tests.rs;h=0025598e4c2400702503fe072b1d8b7459f58b39;hb=44fa3acae85888982b2c808bc4b401e96d33822f;hp=d32dae22e8f2e076e7757185ddd39384efe1467c;hpb=0a2a40c4fd05f39b9485cc0f000f7066636783cb;p=rust-lightning diff --git a/lightning/src/ln/reorg_tests.rs b/lightning/src/ln/reorg_tests.rs index d32dae22..0025598e 100644 --- a/lightning/src/ln/reorg_tests.rs +++ b/lightning/src/ln/reorg_tests.rs @@ -315,6 +315,11 @@ fn test_unconf_chan() { do_test_unconf_chan(false, true, false, ConnectStyle::BestBlockFirstSkippingBlocks); do_test_unconf_chan(true, false, false, ConnectStyle::BestBlockFirstSkippingBlocks); do_test_unconf_chan(false, false, false, ConnectStyle::BestBlockFirstSkippingBlocks); + + do_test_unconf_chan(true, true, false, ConnectStyle::BestBlockFirstReorgsOnlyTip); + do_test_unconf_chan(false, true, false, ConnectStyle::BestBlockFirstReorgsOnlyTip); + do_test_unconf_chan(true, false, false, ConnectStyle::BestBlockFirstReorgsOnlyTip); + do_test_unconf_chan(false, false, false, ConnectStyle::BestBlockFirstReorgsOnlyTip); } #[test] @@ -332,6 +337,11 @@ fn test_unconf_chan_via_funding_unconfirmed() { do_test_unconf_chan(true, false, true, ConnectStyle::BestBlockFirstSkippingBlocks); do_test_unconf_chan(false, false, true, ConnectStyle::BestBlockFirstSkippingBlocks); + do_test_unconf_chan(true, true, true, ConnectStyle::BestBlockFirstReorgsOnlyTip); + do_test_unconf_chan(false, true, true, ConnectStyle::BestBlockFirstReorgsOnlyTip); + do_test_unconf_chan(true, false, true, ConnectStyle::BestBlockFirstReorgsOnlyTip); + do_test_unconf_chan(false, false, true, ConnectStyle::BestBlockFirstReorgsOnlyTip); + do_test_unconf_chan(true, true, true, ConnectStyle::FullBlockViaListen); do_test_unconf_chan(false, true, true, ConnectStyle::FullBlockViaListen); do_test_unconf_chan(true, false, true, ConnectStyle::FullBlockViaListen); @@ -541,7 +551,9 @@ fn do_test_to_remote_after_local_detection(style: ConnectStyle) { fn test_to_remote_after_local_detection() { do_test_to_remote_after_local_detection(ConnectStyle::BestBlockFirst); do_test_to_remote_after_local_detection(ConnectStyle::BestBlockFirstSkippingBlocks); + do_test_to_remote_after_local_detection(ConnectStyle::BestBlockFirstReorgsOnlyTip); do_test_to_remote_after_local_detection(ConnectStyle::TransactionsFirst); do_test_to_remote_after_local_detection(ConnectStyle::TransactionsFirstSkippingBlocks); + do_test_to_remote_after_local_detection(ConnectStyle::TransactionsFirstReorgsOnlyTip); do_test_to_remote_after_local_detection(ConnectStyle::FullBlockViaListen); }