From 896eac6d8cf447f8cc68e675f814a8c39b8bdd0e Mon Sep 17 00:00:00 2001 From: SChernykh <15806605+SChernykh@users.noreply.github.com> Date: Mon, 25 Dec 2023 19:48:36 +0100 Subject: [PATCH] Force debug checks --- src/common.h | 3 ++- src/p2p_server.cpp | 2 +- src/pool_block.h | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/common.h b/src/common.h index f2d9203..eba8ca5 100644 --- a/src/common.h +++ b/src/common.h @@ -92,7 +92,8 @@ #define __has_feature(x) 0 #endif -#if defined(_DEBUG) || defined(__SANITIZE_ADDRESS__) || __has_feature(address_sanitizer) || defined(__SANITIZE_THREAD__) || __has_feature(thread_sanitizer) +// TODO set it to 0 before release +#if 1//defined(_DEBUG) || defined(__SANITIZE_ADDRESS__) || __has_feature(address_sanitizer) || defined(__SANITIZE_THREAD__) || __has_feature(thread_sanitizer) #define P2POOL_DEBUGGING 1 #endif diff --git a/src/p2p_server.cpp b/src/p2p_server.cpp index 26bb1da..699df5e 100644 --- a/src/p2p_server.cpp +++ b/src/p2p_server.cpp @@ -1968,7 +1968,7 @@ bool P2PServer::P2PClient::check_handshake_solution(const hash& solution, const bool P2PServer::P2PClient::on_handshake_challenge(const uint8_t* buf) { - P2PServer* server = static_cast(m_owner); + const P2PServer* server = static_cast(m_owner); server->check_event_loop_thread(__func__); uint8_t challenge[CHALLENGE_SIZE]; diff --git a/src/pool_block.h b/src/pool_block.h index 0ea66c2..e16f695 100644 --- a/src/pool_block.h +++ b/src/pool_block.h @@ -23,7 +23,8 @@ #ifdef _DEBUG #define POOL_BLOCK_DEBUG 1 #else -#define POOL_BLOCK_DEBUG 0 +// TODO set it to 0 before release +#define POOL_BLOCK_DEBUG 1 #endif namespace p2pool {