mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-01 00:19:07 +02:00
refactor: make MempoolMutex() public
for use in the following unittests.
This commit is contained in:
parent
7300ced9de
commit
d70919a88f
@ -748,6 +748,12 @@ public:
|
||||
|
||||
std::string ToString() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
||||
|
||||
//! Indirection necessary to make lock annotations work with an optional mempool.
|
||||
RecursiveMutex* MempoolMutex() const LOCK_RETURNED(m_mempool->cs)
|
||||
{
|
||||
return m_mempool ? &m_mempool->cs : nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
bool ActivateBestChainStep(BlockValidationState& state, CBlockIndex* pindexMostWork, const std::shared_ptr<const CBlock>& pblock, bool& fInvalidFound, ConnectTrace& connectTrace) EXCLUSIVE_LOCKS_REQUIRED(cs_main, m_mempool->cs);
|
||||
bool ConnectTip(BlockValidationState& state, CBlockIndex* pindexNew, const std::shared_ptr<const CBlock>& pblock, ConnectTrace& connectTrace, DisconnectedBlockTransactions& disconnectpool) EXCLUSIVE_LOCKS_REQUIRED(cs_main, m_mempool->cs);
|
||||
@ -761,12 +767,6 @@ private:
|
||||
void CheckForkWarningConditions() EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
void InvalidChainFound(CBlockIndex* pindexNew) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
|
||||
//! Indirection necessary to make lock annotations work with an optional mempool.
|
||||
RecursiveMutex* MempoolMutex() const LOCK_RETURNED(m_mempool->cs)
|
||||
{
|
||||
return m_mempool ? &m_mempool->cs : nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make mempool consistent after a reorg, by re-adding or recursively erasing
|
||||
* disconnected block transactions from the mempool, and also removing any
|
||||
|
Loading…
x
Reference in New Issue
Block a user