From e9b5d547036e10b0cfe279136117fc10a197b80c Mon Sep 17 00:00:00 2001 From: Sergey Kroshnin Date: Fri, 26 Apr 2019 15:31:46 +0300 Subject: [PATCH] Increase request_interval_ms for TSAN/ASAN build (#1934) * Increase request_interval_ms for test network * Increase request_interval_ms for NANO_TSAN/NANO_ASAN builds --- nano/lib/config.hpp | 8 +++++++- nano/node/active_transactions.cpp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/nano/lib/config.hpp b/nano/lib/config.hpp index 646fdcd9..bf401f88 100644 --- a/nano/lib/config.hpp +++ b/nano/lib/config.hpp @@ -55,7 +55,13 @@ public: default_rpc_port = is_live_network () ? 7076 : is_beta_network () ? 55000 : 45000; default_ipc_port = is_live_network () ? 7077 : is_beta_network () ? 56000 : 46000; default_websocket_port = is_live_network () ? 7078 : is_beta_network () ? 57000 : 47000; - request_interval_ms = is_test_network () ? 10 : 16000; + request_interval_ms = is_test_network () ? 20 : 16000; + // Increase interval for test TSAN/ASAN builds +#if defined(__has_feature) +#if __has_feature(thread_sanitizer) || __has_feature(address_sanitizer) + request_interval_ms = is_test_network () ? 100 : 16000; +#endif +#endif } /** The network this param object represents. This may differ from the global active network; this is needed for certain --debug... commands */ diff --git a/nano/node/active_transactions.cpp b/nano/node/active_transactions.cpp index f3369309..04d92539 100644 --- a/nano/node/active_transactions.cpp +++ b/nano/node/active_transactions.cpp @@ -76,7 +76,7 @@ void nano::active_transactions::request_confirm (std::unique_lock & auto transaction (node.store.tx_begin_read ()); unsigned unconfirmed_count (0); unsigned unconfirmed_announcements (0); - unsigned could_fit_delay = node.network_params.network.is_test_network () ? 10 : 1; + unsigned could_fit_delay = node.network_params.network.is_test_network () ? announcement_long - 1 : 1; std::unordered_map, std::vector>> requests_bundle; std::deque> rebroadcast_bundle; std::deque, std::shared_ptr>>>> confirm_req_bundle;