Page MenuHomePhabricator

mempool: Fix missing locking in CTxMemPool::check(…) and CTxMemPool::setSanityCheck(…)
ClosedPublic

Authored by deadalnix on Jun 12 2019, 21:12.

Details

Summary

This is a backport of Core PR11689

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'

Fix missing locking in CTxMemPool::setSanityCheck(double dFrequency)

  • writing variable 'nCheckFrequency' requires holding mutex 'cs'

Add Clang thread safety analysis annotations

Test Plan
make check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien added inline comments.
src/txmempool.h
575 ↗(On Diff #9367)

Please rebase on top of D3313

This revision is now accepted and ready to land.Jun 14 2019, 00:43