From b27e80fd2e0e5c2f92dffecd043da80a0d55070c Mon Sep 17 00:00:00 2001 From: Peter Tschipper Date: Mon, 1 May 2017 05:51:06 -0700 Subject: [PATCH] Lock mapThinBlocksInFlight before erasing elements, in parallel.cpp --- src/parallel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/parallel.cpp b/src/parallel.cpp index 9001d9618d3..9732dfe83a3 100644 --- a/src/parallel.cpp +++ b/src/parallel.cpp @@ -5,6 +5,7 @@ #include "parallel.h" #include "chainparams.h" #include "main.h" +#include "net.h" #include "pow.h" #include "timedata.h" #include "unlimited.h" @@ -552,7 +553,7 @@ void HandleBlockMessageThread(CNode *pfrom, const string &strCommand, const CBlo { int nTotalThinBlocksInFlight = 0; { - LOCK(cs_vNodes); + LOCK2(cs_vNodes, pfrom->cs_mapthinblocksinflight); // Erase this thinblock from the tracking map now that we're done with it. if (pfrom->mapThinBlocksInFlight.erase(inv.hash)) {