mirror of
https://github.com/SChernykh/p2pool.git
synced 2025-03-12 09:29:51 +00:00
Added macro for debug builds
This commit is contained in:
parent
a917a9493c
commit
c029e5c39d
2 changed files with 10 additions and 1 deletions
|
@ -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…
Reference in a new issue