rust-lightning/lightning
Matt Corallo 6090d9e6a8 Test if a given mutex is locked by the current thread in tests
In anticipation of the next commit(s) adding threaded tests, we
need to ensure our lockorder checks work fine with multiple
threads. Sadly, currently we have tests in the form
`assert!(mutex.try_lock().is_ok())` to assert that a given mutex is
not locked by the caller to a function.

The fix is rather simple given we already track mutexes locked by a
thread in our `debug_sync` logic - simply replace the check with a
new extension trait which (for test builds) checks the locked state
by only looking at what was locked by the current thread.
2023-02-16 21:35:23 +00:00
..
src Test if a given mutex is locked by the current thread in tests 2023-02-16 21:35:23 +00:00
Cargo.toml Bump crate versions to 0.0.113/invoice 0.21 2022-12-15 22:15:55 +00:00