]> git.bitcoin.ninja Git - rust-lightning/commit
Fix `data_loss_protect` test to actually test DLP
authorMatt Corallo <git@bluematt.me>
Thu, 9 Nov 2023 00:01:39 +0000 (00:01 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 9 Nov 2023 00:05:23 +0000 (00:05 +0000)
commit589a88e7498590050bdf202b525b8e227a6322de
treeccc1f25878675d4fc21ac4e8013544e74d09600f
parent1e259791286424c83089535af71a8b11e4cdd69b
Fix `data_loss_protect` test to actually test DLP

The data loss protect test was panicking in a message assertion
which should be passing, but because the test was marked only
`#[should_panic]` it was being treated as a successful outcome.
Instead, we use `catch_unwind` on exactly the line we expect to
panic to ensure we are hitting the right one.
lightning/src/ln/reload_tests.rs