aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.h
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2018-04-04 14:04:10 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2018-06-12 21:45:46 +0200
commit9fdf05d70cac4a62d1aeeb4299e2c3a9a866f8af (patch)
treeb91213c7aa45bc05eabcd67996840f8ca7cd96a7 /src/net_processing.h
parenta607d23ae82ee374799d21d02932d945c1ce9616 (diff)
downloadbitcoin-9fdf05d70cac4a62d1aeeb4299e2c3a9a866f8af.tar.xz
tests: Fix lock-order-inversion (potential deadlock) in DoS_tests. Reported by TSAN.
Makes `src/test/test_bitcoin --run_test=DoS_tests` pass also when compiled with TreadSanitizer (`./configure --with-sanitizers=thread`).
Diffstat (limited to 'src/net_processing.h')
-rw-r--r--src/net_processing.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net_processing.h b/src/net_processing.h
index b0b905d922..3bdb4785a2 100644
--- a/src/net_processing.h
+++ b/src/net_processing.h
@@ -77,7 +77,7 @@ public:
* @param[in] interrupt Interrupt condition for processing threads
* @return True if there is more work to be done
*/
- bool SendMessages(CNode* pto, std::atomic<bool>& interrupt) override;
+ bool SendMessages(CNode* pto, std::atomic<bool>& interrupt) override EXCLUSIVE_LOCKS_REQUIRED(pto->cs_sendProcessing);
/** Consider evicting an outbound peer based on the amount of time they've been behind our tip */
void ConsiderEviction(CNode *pto, int64_t time_in_seconds);