Merge branch 'dev' of https://git.hush.is/hush/hush3 into dev

This commit is contained in:
Duke
2024-09-11 14:53:58 -04:00
5 changed files with 37 additions and 3 deletions

View File

@@ -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("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
// even when -connect or -proxy is specified
if (mapArgs.count("-bind")) {

View File

@@ -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
const int minVersion = ishush3 ? MIN_HUSH_PEER_PROTO_VERSION : MIN_PEER_PROTO_VERSION;
vRecv >> nVersion >> pfrom->nServices >> nTime >> addrMe;
if (nVersion == 10300)
nVersion = 300;
if (nVersion < minVersion)
{
// disconnect from peers older than this proto version

View File

@@ -47,6 +47,8 @@ static const bool DEFAULT_LOGTIMEMICROS = false;
static const bool DEFAULT_LOGIPS = false;
static const bool DEFAULT_LOGTIMESTAMPS = true;
void CheckIfWeShouldStop();
/** Signals for translation. */
class CTranslationInterface
{
@@ -272,14 +274,17 @@ template <typename Callable> void TraceThread(const char* name, Callable func)
catch (const boost::thread_interrupted&)
{
LogPrintf("%s thread interrupt\n", name);
CheckIfWeShouldStop();
throw;
}
catch (const std::exception& e) {
PrintExceptionContinue(&e, name);
CheckIfWeShouldStop();
throw;
}
catch (...) {
PrintExceptionContinue(NULL, name);
CheckIfWeShouldStop();
throw;
}
}