From aaf8d157082ec0aec03c734ab3368fa8e2c4556c Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Sun, 15 Dec 2013 13:37:10 +0100 Subject: [PATCH] qt: Add missing LOCKs for locked coin functions These don't aquire the wallet lock internally, so the caller has to do it. --- src/qt/walletmodel.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 >& 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& vOutpts) { + LOCK(wallet->cs_wallet); wallet->ListLockedCoins(vOutpts); }