Before:
Assertion failed: detected double lock at src/sync.cpp:153, details in debug log.
After:
Assertion failed: detected double lock for 'm' in src/test/sync_tests.cpp:40 (in thread ''), details in debug log.
Before:
Assertion failed: detected double lock at src/sync.cpp:153, details in debug log.
After:
Assertion failed: detected double lock for 'm' in src/test/sync_tests.cpp:40 (in thread ''), details in debug log.
Before:
```
Assertion failed: detected double lock at src/sync.cpp:153, details in debug log.
```
After:
```
Assertion failed: detected double lock for 'm' in src/test/sync_tests.cpp:40 (in thread ''), details in debug log.
```
It is not modified in the function, so should be `const`.
`HasReason()` is shorter than a lambda function.
To force printing of the message:
--- i/src/test/sync_tests.cpp
+++ w/src/test/sync_tests.cpp
@@ -46,5 +46,4 @@ void TestDoubleLock(bool should_throw)
{
const bool prev = g_debug_lockorder_abort;
- g_debug_lockorder_abort = false;
MutexType m;
and run ./src/test/test_bitcoin --run_test="sync_tests/double_lock_mutex"
Concept ACK
ACK db058efeb0821cb5022e3b29e0aff3627d7aaf83, tested on Linux Mint 20 (x86_64).
Thanks for fixing :+1:
Thanks for fixing! utACK db058efeb0821cb5022e3b29e0aff3627d7aaf83
ACK db058efeb0821cb5022e3b29e0aff3627d7aaf83
Code review ACK db058efeb0821cb5022e3b29e0aff3627d7aaf83.