mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
merge bitcoin#20972: Annotate CTxMemPool::check to require cs_main
This commit is contained in:
parent
9d55bd8d1c
commit
228a7fb4a1
@ -1034,6 +1034,7 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const
|
||||
|
||||
if (GetRand(m_check_ratio) >= 1) return;
|
||||
|
||||
AssertLockHeld(::cs_main);
|
||||
LOCK(cs);
|
||||
LogPrint(BCLog::MEMPOOL, "Checking mempool with %u transactions and %u inputs\n", (unsigned int)mapTx.size(), (unsigned int)mapNextTx.size());
|
||||
|
||||
|
@ -596,7 +596,7 @@ public:
|
||||
* all inputs are in the mapNextTx array). If sanity-checking is turned off,
|
||||
* check does nothing.
|
||||
*/
|
||||
void check(const CCoinsViewCache *pcoins) const;
|
||||
void check(const CCoinsViewCache *pcoins) const EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
||||
|
||||
// addUnchecked must updated state for all ancestors of a given transaction,
|
||||
// to track size/count of descendant transactions. First version of
|
||||
|
Loading…
Reference in New Issue
Block a user