mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Merge #8995: Add missing cs_main lock to ::GETBLOCKTXN processing
dfe7906
Add missing cs_main lock to ::GETBLOCKTXN processing (Matt Corallo)
This commit is contained in:
commit
ced22d035a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user