Added macro for debug builds

pull/226/head
SChernykh 2 years ago
parent a917a9493c
commit c029e5c39d

@ -81,6 +81,14 @@
#endif
#ifndef __has_feature
#define __has_feature(x) 0
#endif
#if defined(_DEBUG) || defined(__SANITIZE_ADDRESS__) || __has_feature(address_sanitizer) || defined(__SANITIZE_THREAD__) || __has_feature(thread_sanitizer)
#define P2POOL_DEBUGGING 1
#endif
namespace p2pool {
constexpr size_t HASH_SIZE = 32;

@ -171,7 +171,8 @@ SideChain::SideChain(p2pool* pool, NetworkType type, const char* pool_name)
// Use between 1 and 8 threads
if (numThreads < 1) numThreads = 1;
#ifndef _DEBUG
// Don't limit thread count when debugging because debug builds are slow
#ifndef P2POOL_DEBUGGING
if (numThreads > 8) numThreads = 8;
#endif

Loading…
Cancel
Save