diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2012-04-09 13:25:17 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2012-04-09 13:25:17 -0700 |
commit | 1a275bac2b5454ae9d6744f28c29cbf40e2fbf13 (patch) | |
tree | 4cf7a1b4001ef82c15f4942f6a495aaf530c7d0e /src/wallet.h | |
parent | 1044391135b9d2e309c1e960afc72afa2a7e04f5 (diff) | |
parent | f342dac1cb06d5b0d264fa59e448ef6477ec5b6b (diff) |
Merge pull request #1052 from sipa/scopedlocks
Use scoped locks instead of CRITICAL_BLOCK
Diffstat (limited to 'src/wallet.h')
-rw-r--r-- | src/wallet.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wallet.h b/src/wallet.h index e1065cff38..f864370acf 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -211,16 +211,18 @@ public: void UpdatedTransaction(const uint256 &hashTx) { - CRITICAL_BLOCK(cs_wallet) + { + LOCK(cs_wallet); vWalletUpdated.push_back(hashTx); + } } void PrintWallet(const CBlock& block); void Inventory(const uint256 &hash) { - CRITICAL_BLOCK(cs_wallet) { + LOCK(cs_wallet); std::map<uint256, int>::iterator mi = mapRequestCount.find(hash); if (mi != mapRequestCount.end()) (*mi).second++; |