Skip to content

Commit

Permalink
Lock mapThinBlocksInFlight before erasing elements, in parallel.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ptschip committed May 4, 2017
1 parent 0095c78 commit b27e80f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/parallel.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -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))
{
Expand Down

0 comments on commit b27e80f

Please sign in to comment.