Merge branch 'dev' of https://git.hush.is/hush/hush3 into dev
This commit is contained in:
23
debug-build.sh
Executable file
23
debug-build.sh
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Copyright (c) 2016-2024 The Hush developers
|
||||||
|
# Distributed under the GPLv3 software license, see the accompanying
|
||||||
|
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||||
|
|
||||||
|
set -eu -o pipefail
|
||||||
|
|
||||||
|
echo "Compiling a debug build with --enable-debug..."
|
||||||
|
|
||||||
|
# run correct build script for detected OS
|
||||||
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||||
|
CONFIGURE_FLAGS=--enable-debug ./util/build.sh --disable-tests $@
|
||||||
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
# code from ./util/build.sh needs to be ported to support --disable-tests
|
||||||
|
#./util/build-mac.sh --disable-tests $@
|
||||||
|
CONFIGURE_FLAGS=--enable-debug ./util/build-mac.sh $@
|
||||||
|
elif [[ "$OSTYPE" == "msys"* ]]; then
|
||||||
|
CONFIGURE_FLAGS=--enable-debug ./util/build-win.sh --disable-tests $@
|
||||||
|
elif [[ "$OSTYPE" == "freebsd"* ]]; then
|
||||||
|
CONFIGURE_FLAGS=--enable-debug ./util/build.sh --disable-tests $@
|
||||||
|
else
|
||||||
|
echo "Unable to detect your OS. What are you using?"
|
||||||
|
fi
|
||||||
@@ -13,7 +13,7 @@ define $(package)_preprocess_cmds
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_set_vars
|
define $(package)_set_vars
|
||||||
$(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress
|
$(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress --disable-samples
|
||||||
$(package)_config_opts_release=--disable-debug-mode
|
$(package)_config_opts_release=--disable-debug-mode
|
||||||
$(package)_config_opts_linux=--with-pic
|
$(package)_config_opts_linux=--with-pic
|
||||||
endef
|
endef
|
||||||
|
|||||||
@@ -1085,6 +1085,13 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||||||
LogPrintf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
|
LogPrintf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
|
||||||
LogPrintf("Hush version %s (%s)\n", FormatFullVersion());
|
LogPrintf("Hush version %s (%s)\n", FormatFullVersion());
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef DEBUG_LOCKORDER
|
||||||
|
LogPrintf("DEBUG_LOCKORDER enabled\n");
|
||||||
|
#else
|
||||||
|
LogPrintf("DEBUG_LOCKORDER disabled\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
// when specifying an explicit binding address, you want to listen on it
|
// when specifying an explicit binding address, you want to listen on it
|
||||||
// even when -connect or -proxy is specified
|
// even when -connect or -proxy is specified
|
||||||
if (mapArgs.count("-bind")) {
|
if (mapArgs.count("-bind")) {
|
||||||
|
|||||||
@@ -6915,8 +6915,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
|||||||
int nVersion; // use temporary for version, don't set version number until validated as connected
|
int nVersion; // use temporary for version, don't set version number until validated as connected
|
||||||
const int minVersion = ishush3 ? MIN_HUSH_PEER_PROTO_VERSION : MIN_PEER_PROTO_VERSION;
|
const int minVersion = ishush3 ? MIN_HUSH_PEER_PROTO_VERSION : MIN_PEER_PROTO_VERSION;
|
||||||
vRecv >> nVersion >> pfrom->nServices >> nTime >> addrMe;
|
vRecv >> nVersion >> pfrom->nServices >> nTime >> addrMe;
|
||||||
if (nVersion == 10300)
|
|
||||||
nVersion = 300;
|
|
||||||
if (nVersion < minVersion)
|
if (nVersion < minVersion)
|
||||||
{
|
{
|
||||||
// disconnect from peers older than this proto version
|
// disconnect from peers older than this proto version
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ static const bool DEFAULT_LOGTIMEMICROS = false;
|
|||||||
static const bool DEFAULT_LOGIPS = false;
|
static const bool DEFAULT_LOGIPS = false;
|
||||||
static const bool DEFAULT_LOGTIMESTAMPS = true;
|
static const bool DEFAULT_LOGTIMESTAMPS = true;
|
||||||
|
|
||||||
|
void CheckIfWeShouldStop();
|
||||||
|
|
||||||
/** Signals for translation. */
|
/** Signals for translation. */
|
||||||
class CTranslationInterface
|
class CTranslationInterface
|
||||||
{
|
{
|
||||||
@@ -272,14 +274,17 @@ template <typename Callable> void TraceThread(const char* name, Callable func)
|
|||||||
catch (const boost::thread_interrupted&)
|
catch (const boost::thread_interrupted&)
|
||||||
{
|
{
|
||||||
LogPrintf("%s thread interrupt\n", name);
|
LogPrintf("%s thread interrupt\n", name);
|
||||||
|
CheckIfWeShouldStop();
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
catch (const std::exception& e) {
|
catch (const std::exception& e) {
|
||||||
PrintExceptionContinue(&e, name);
|
PrintExceptionContinue(&e, name);
|
||||||
|
CheckIfWeShouldStop();
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
catch (...) {
|
catch (...) {
|
||||||
PrintExceptionContinue(NULL, name);
|
PrintExceptionContinue(NULL, name);
|
||||||
|
CheckIfWeShouldStop();
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user