Fix for incorrect locking in GetPubKey() (keystore.cpp)

zcash: cherry picked from commit 220f950ab1302f8f8c0bb5b9c818f3d6569796bd
zcash: https://github.com/bitcoin/bitcoin/pull/7913
This commit is contained in:
Yuri Zhykin 2016-04-20 00:03:42 +03:00 committed by Larry Ruane
parent 41713465f5
commit e715e1393b
1 changed files with 1 additions and 0 deletions

View File

@ -18,6 +18,7 @@ bool CBasicKeyStore::GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) con
{
CKey key;
if (!GetKey(address, key)) {
LOCK(cs_KeyStore);
WatchKeyMap::const_iterator it = mapWatchKeys.find(address);
if (it != mapWatchKeys.end()) {
vchPubKeyOut = it->second;