From 9fdf05d70cac4a62d1aeeb4299e2c3a9a866f8af Mon Sep 17 00:00:00 2001 From: practicalswift Date: Wed, 4 Apr 2018 14:04:10 +0200 Subject: 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`). --- src/net_processing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net_processing.h') 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& interrupt) override; + bool SendMessages(CNode* pto, std::atomic& 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); -- cgit v1.2.3