Use scoped locks instead of CRITICAL_BLOCK

This commit is contained in:
Pieter Wuille
2012-04-06 18:39:12 +02:00
parent 138d08c531
commit f8dcd5ca6f
19 changed files with 286 additions and 190 deletions

View File

@@ -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++;