Restrict `ChannelManager` persist in fuzzing to when we're told to 2023-08-one-less-write
authorMatt Corallo <git@bluematt.me>
Mon, 28 Aug 2023 01:25:36 +0000 (01:25 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 12 Sep 2023 21:28:30 +0000 (21:28 +0000)
commit32e5903ef23c6861b88dc4c078ba100785c2e2cb
tree37fa3bb3e9660e3cab14bcc7e94e959cac204e78
parent5c3fa553a10be74a123b9530da4aec2342164d97
Restrict `ChannelManager` persist in fuzzing to when we're told to

In the `chanmon_consistency` fuzz, we currently "persist" the
`ChannelManager` on each loop iteration. With the new logic in the
past few commits to reduce the frequency of `ChannelManager`
persistences, this behavior now leaves a gap in our test coverage -
missing persistence notifications.

In order to cath (common-case) persistence misses, we update the
`chanmon_consistency` fuzzer to no longer persist the
`ChannelManager` unless the waker was woken and signaled to
persist, possibly reloading with a previous `ChannelManager` if we
were not signaled.
fuzz/src/chanmon_consistency.rs