Fix missing locking in CTxMemPool::check(const CCoinsViewCache *pcoins)
* reading variable 'mapTx' requires holding mutex 'cs' * reading variable 'mapNextTx' requires holding mutex 'cs' * reading variable 'nCheckFrequency' requires holding mutex 'cs'
This commit is contained in:
parent
66cc47be98
commit
6bc5b7100b
1 changed files with 1 additions and 1 deletions
|
@ -618,6 +618,7 @@ static void CheckInputsAndUpdateCoins(const CTransaction& tx, CCoinsViewCache& m
|
|||
|
||||
void CTxMemPool::check(const CCoinsViewCache *pcoins) const
|
||||
{
|
||||
LOCK(cs);
|
||||
if (nCheckFrequency == 0)
|
||||
return;
|
||||
|
||||
|
@ -632,7 +633,6 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const
|
|||
CCoinsViewCache mempoolDuplicate(const_cast<CCoinsViewCache*>(pcoins));
|
||||
const int64_t spendheight = GetSpendHeight(mempoolDuplicate);
|
||||
|
||||
LOCK(cs);
|
||||
std::list<const CTxMemPoolEntry*> waitingOnDependants;
|
||||
for (indexed_transaction_set::const_iterator it = mapTx.begin(); it != mapTx.end(); it++) {
|
||||
unsigned int i = 0;
|
||||
|
|
Loading…
Reference in a new issue