Skip to content

Commit ced22d0

Browse files
committed
Merge #8995: Add missing cs_main lock to ::GETBLOCKTXN processing
dfe7906 Add missing cs_main lock to ::GETBLOCKTXN processing (Matt Corallo)
2 parents fd29348 + dfe7906 commit ced22d0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5442,6 +5442,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
54425442
BlockTransactionsRequest req;
54435443
vRecv >> req;
54445444

5445+
LOCK(cs_main);
5446+
54455447
BlockMap::iterator it = mapBlockIndex.find(req.blockhash);
54465448
if (it == mapBlockIndex.end() || !(it->second->nStatus & BLOCK_HAVE_DATA)) {
54475449
LogPrintf("Peer %d sent us a getblocktxn for a block we don't have", pfrom->id);

0 commit comments

Comments
 (0)