diff --git a/changelog.txt b/changelog.txt index 8d0efafbf4..32bd53c180 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,11 @@ +1.6.4.6 + +RPC - Fix an issue introduced in 1.6.4.3 which can cause users running with "-disablewallet" to experience RPC freezes when calling certain RPC commands. + +1.6.4.5 + +UI - Fix "run on boot" links that were broken by testnet changes and other minor "run on boot" corrections. + 1.6.4.4 RPC - Fix an issue with the 'unlock' callback of 'walletpassphrase' whereby it could temporarily freeze the main RPC thread. In most cases this would result in slow RPC but in extreme cases it could be so slow that the slowness would then cascade into other parts of the program (e.g. peers timing out) presenting as a frozen RPC that no longer diff --git a/configure.ac b/configure.ac index 4cd8b9b2dc..dd3b04bd93 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 1) define(_CLIENT_VERSION_MINOR, 6) define(_CLIENT_VERSION_REVISION, 4) -define(_CLIENT_VERSION_BUILD, 5) +define(_CLIENT_VERSION_BUILD, 6) define(_CLIENT_VERSION_IS_RELEASE, false) define(_COPYRIGHT_YEAR, 2016) define(_COPYRIGHT_HOLDERS,[The %s developers]) diff --git a/src/clientversion.h b/src/clientversion.h index 6dc0b046a9..90b8d3b1e8 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -17,7 +17,7 @@ #define CLIENT_VERSION_MAJOR 1 #define CLIENT_VERSION_MINOR 6 #define CLIENT_VERSION_REVISION 4 -#define CLIENT_VERSION_BUILD 5 +#define CLIENT_VERSION_BUILD 6 //! Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE false diff --git a/src/sync.h b/src/sync.h index 026d67ac52..c7e40cddee 100644 --- a/src/sync.h +++ b/src/sync.h @@ -170,13 +170,27 @@ typedef CMutexLock CCriticalBlock; #define LOCK2(cs1, cs2) CCriticalBlock criticalblock1(cs1, #cs1, __FILE__, __LINE__), criticalblock2(cs2, #cs2, __FILE__, __LINE__) #define TRY_LOCK(cs, name) CCriticalBlock name(cs, #cs, __FILE__, __LINE__, true) +template +bool IsNullMutex(T& m) +{ + return false; +} +template +bool IsNullMutex(T* m) +{ + if (m == NULL) { + return true; + } + return false; +} + #define DS_LOCK2(cs1, cs2) \ std::shared_ptr criticalblock1 = nullptr; \ std::shared_ptr criticalblock2 = nullptr; \ while (true) { \ criticalblock1 = std::shared_ptr(new CCriticalBlock(cs1, #cs1, __FILE__, __LINE__, true)); \ criticalblock2 = std::shared_ptr(new CCriticalBlock(cs2, #cs2, __FILE__, __LINE__, true)); \ - if (!(*criticalblock1) || !(*criticalblock2)) { \ + if ((!(*criticalblock1) && !IsNullMutex(cs1)) || (!(*criticalblock2) && !IsNullMutex(cs2))) { \ criticalblock1 = nullptr; \ criticalblock2 = nullptr; \ MilliSleep(50); \