Add basic async signer tests
authorChris Waterson <waterson@gmail.com>
Wed, 6 Sep 2023 18:38:34 +0000 (11:38 -0700)
committerChris Waterson <waterson@gmail.com>
Wed, 1 Nov 2023 22:24:20 +0000 (15:24 -0700)
commit014a336e592bfc8cb49929b799b9d6d9286dab16
tree6b8d8b9ae4892ad60869a9a6c9c515fe3bbb45fd
parent4278afc9aa73c1ce4f2422b6ada6e470e6e2213e
Add basic async signer tests

Adds a `get_signer` method to the context so that a test can get ahold of the
channel signer. Adds a `set_available` method on the `TestChannelSigner` to
allow a test to enable and disable the signer: when disabled some of the
signer's methods will return `Err` which will typically activate the error
handling case. Adds a `set_channel_signer_available` function on the test
`Node` class to make it easy to enable and disable a specific signer.

Adds a new `async_signer_tests` module:

* Check for asynchronous handling of `funding_created` and `funding_signed`.
* Check that we correctly resume processing after awaiting an asynchronous
  signature for a `commitment_signed` event.
* Verify correct handling during peer disconnect.
* Verify correct handling for inbound zero-conf.
fuzz/src/chanmon_consistency.rs
lightning/src/ln/async_signer_tests.rs [new file with mode: 0644]
lightning/src/ln/channel.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/mod.rs
lightning/src/util/test_channel_signer.rs