aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-12-15 13:37:10 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-01-06 10:34:34 +0100
commitaaf8d157082ec0aec03c734ab3368fa8e2c4556c (patch)
tree9bce04ee4343ea2becb02c5ff4af987a18bd4e0c
parent4757e923185d48c3169bc2d216db88484f036455 (diff)
qt: Add missing LOCKs for locked coin functions
These don't aquire the wallet lock internally, so the caller has to do it.
-rw-r--r--src/qt/walletmodel.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index f08342b83e..78bc170623 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -531,20 +531,24 @@ void WalletModel::listCoins(std::map<QString, std::vector<COutput> >& mapCoins)
bool WalletModel::isLockedCoin(uint256 hash, unsigned int n) const
{
+ LOCK(wallet->cs_wallet);
return wallet->IsLockedCoin(hash, n);
}
void WalletModel::lockCoin(COutPoint& output)
{
+ LOCK(wallet->cs_wallet);
wallet->LockCoin(output);
}
void WalletModel::unlockCoin(COutPoint& output)
{
+ LOCK(wallet->cs_wallet);
wallet->UnlockCoin(output);
}
void WalletModel::listLockedCoins(std::vector<COutPoint>& vOutpts)
{
+ LOCK(wallet->cs_wallet);
wallet->ListLockedCoins(vOutpts);
}