aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Zhykin <yuri.zhykin@gmail.com>2016-04-20 00:03:42 +0300
committerYuri Zhykin <yuri.zhykin@gmail.com>2016-04-20 16:04:28 +0300
commit220f950ab1302f8f8c0bb5b9c818f3d6569796bd (patch)
tree1cb661045148ef4bbb8a8a1fffb7c18d8a269460
parent04a29373571d44be36bd099c3b3ec3cda89e99d1 (diff)
Fix for incorrect locking in GetPubKey() (keystore.cpp)
-rw-r--r--src/keystore.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/keystore.cpp b/src/keystore.cpp
index cc8a573367..d568a74350 100644
--- a/src/keystore.cpp
+++ b/src/keystore.cpp
@@ -19,6 +19,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;