aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-10-24 11:17:04 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-10-24 11:17:07 +0200
commitced22d035ac0f769c9c7cc21ad24d2caafb4b4e9 (patch)
tree8eca057f96c143b1dfdd86a8807b7ccba427c1fc
parentfd29348dbe82abb3a315d6226332c7470c2c88f2 (diff)
parentdfe79060a62c8de098e75d527d97b99c3b10de50 (diff)
Merge #8995: Add missing cs_main lock to ::GETBLOCKTXN processing
dfe7906 Add missing cs_main lock to ::GETBLOCKTXN processing (Matt Corallo)
-rw-r--r--src/main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 4e1c20de2a..9c0f25950a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -5442,6 +5442,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
BlockTransactionsRequest req;
vRecv >> req;
+ LOCK(cs_main);
+
BlockMap::iterator it = mapBlockIndex.find(req.blockhash);
if (it == mapBlockIndex.end() || !(it->second->nStatus & BLOCK_HAVE_DATA)) {
LogPrintf("Peer %d sent us a getblocktxn for a block we don't have", pfrom->id);