aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2016-10-24 11:17:04 +0200
committerWladimir J. van der Laan <[email protected]>2016-10-24 11:17:07 +0200
commitced22d035ac0f769c9c7cc21ad24d2caafb4b4e9 (patch)
tree8eca057f96c143b1dfdd86a8807b7ccba427c1fc /src/main.cpp
parentMerge #8993: Trivial: Fix doxygen comment: the transaction is returned in txOut (diff)
parentAdd missing cs_main lock to ::GETBLOCKTXN processing (diff)
downloaddiscoin-ced22d035ac0f769c9c7cc21ad24d2caafb4b4e9.tar.xz
discoin-ced22d035ac0f769c9c7cc21ad24d2caafb4b4e9.zip
Merge #8995: Add missing cs_main lock to ::GETBLOCKTXN processing
dfe7906 Add missing cs_main lock to ::GETBLOCKTXN processing (Matt Corallo)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 4e1c20de2..9c0f25950 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);