Skip to content

Commit

Permalink
1.6.4.6 Fix an issue introduced in 1.6.4.3 which can cause users runn…
Browse files Browse the repository at this point in the history
…ing with "-disablewallet" to experience RPC freezes when calling certain RPC commands. Closes #66
  • Loading branch information
nlg-buildbot committed Oct 16, 2017
1 parent cd58843 commit eca5a5a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
8 changes: 8 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 15 additions & 1 deletion src/sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,27 @@ typedef CMutexLock<CCriticalSection> 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 <class T>
bool IsNullMutex(T& m)
{
return false;
}
template <class T>
bool IsNullMutex(T* m)
{
if (m == NULL) {
return true;
}
return false;
}

#define DS_LOCK2(cs1, cs2) \
std::shared_ptr<CCriticalBlock> criticalblock1 = nullptr; \
std::shared_ptr<CCriticalBlock> criticalblock2 = nullptr; \
while (true) { \
criticalblock1 = std::shared_ptr<CCriticalBlock>(new CCriticalBlock(cs1, #cs1, __FILE__, __LINE__, true)); \
criticalblock2 = std::shared_ptr<CCriticalBlock>(new CCriticalBlock(cs2, #cs2, __FILE__, __LINE__, true)); \
if (!(*criticalblock1) || !(*criticalblock2)) { \
if ((!(*criticalblock1) && !IsNullMutex(cs1)) || (!(*criticalblock2) && !IsNullMutex(cs2))) { \
criticalblock1 = nullptr; \
criticalblock2 = nullptr; \
MilliSleep(50); \
Expand Down

0 comments on commit eca5a5a

Please sign in to comment.