Fix flaky aggregated HTLC revocation test.
authorArik Sosman <git@arik.io>
Sat, 26 Aug 2023 00:34:10 +0000 (17:34 -0700)
committerArik Sosman <git@arik.io>
Sun, 27 Aug 2023 17:24:38 +0000 (10:24 -0700)
commitf80284cc88ccbac8168316eba887e51142623cc1
tree9c466d77b4cfef41814b97bb18a578586783aba7
parentc7a4949a25aed0e10bf0d65e9a5918eea5e22615
Fix flaky aggregated HTLC revocation test.

Releasing write locks in between monitor updates
requires storing a set of cloned keys to iterate
over. For efficiency purposes, that set of keys
is an actual set, as opposed to array, which means
that the iteration order may not be consistent.

The test was relying on an event array index to
access the revocation transaction. We change that
to accessing a hash map keyed by the txid, fixing
the test.
lightning/src/ln/monitor_tests.rs