]> git.bitcoin.ninja Git - rust-lightning/commit
Test justice tx formation from persistence
authorAlec Chen <alecchendev@gmail.com>
Tue, 11 Jul 2023 22:20:54 +0000 (17:20 -0500)
committerAlec Chen <alecchendev@gmail.com>
Wed, 23 Aug 2023 17:33:16 +0000 (12:33 -0500)
commitb20b1dbe678d12480f79c736b37ab10ab79a9b06
tree1b1cf1fe1258ff9f836a87d9d0cf6be3e1454c5f
parent2cb25576697f368f1807d6a1f2db3d6086beb84b
Test justice tx formation from persistence

Here we implement `WatchtowerPersister`, which provides a test-only
sample implementation of `Persist` similar to how we might imagine a
user to build watchtower-like functionality in the persistence pipeline.

We test that the `WatchtowerPersister` is able to successfully build and
sign a valid justice transaction that sweeps a counterparty's funds if
they broadcast an old commitment.
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs
lightning/src/util/test_utils.rs