aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.h
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2014-02-18 12:11:46 -0500
committerGavin Andresen <gavinandresen@gmail.com>2014-02-18 12:11:46 -0500
commitca4cf5cff6fb60c9769b62acce2e3a8fcd0e7aae (patch)
tree87a92041e1d394ad06d8506be036973f5b5e0fd4 /src/wallet.h
parent5c9932345976de17b1a02401162466995d8355e3 (diff)
Wallet locking fixes for -DDEBUG_LOCKORDER
Compiling with -DDEBUG_LOCKORDER and running the qa/rpc-test/ regression tests uncovered a couple of wallet methods that should (but didn't) acquire the cs_wallet mutext. I also changed the AssertLockHeld() routine print to stderr and abort, instead of printing to debug.log and then assert()'ing. It is annoying to look in debug.log to find out which AssertLockHeld is failing.
Diffstat (limited to 'src/wallet.h')
-rw-r--r--src/wallet.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet.h b/src/wallet.h
index 95fb0ee9de..eb192f1ca6 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -363,7 +363,7 @@ public:
bool SetMaxVersion(int nVersion);
// get the current wallet format (the oldest client version guaranteed to understand this wallet)
- int GetVersion() { AssertLockHeld(cs_wallet); return nWalletVersion; }
+ int GetVersion() { LOCK(cs_wallet); return nWalletVersion; }
// Get wallet transactions that conflict with given transaction (spend same outputs)
std::set<uint256> GetConflicts(const uint256& txid) const;