aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.h
diff options
context:
space:
mode:
authorpracticalswift <[email protected]>2018-04-04 14:04:10 +0200
committerpracticalswift <[email protected]>2018-06-12 21:45:46 +0200
commit9fdf05d70cac4a62d1aeeb4299e2c3a9a866f8af (patch)
treeb91213c7aa45bc05eabcd67996840f8ca7cd96a7 /src/net_processing.h
parentMerge #13393: Enable double-SHA256-for-64-byte code on 32-bit x86 (diff)
downloaddiscoin-9fdf05d70cac4a62d1aeeb4299e2c3a9a866f8af.tar.xz
discoin-9fdf05d70cac4a62d1aeeb4299e2c3a9a866f8af.zip
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 b0b905d92..3bdb4785a 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);