mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 02:33:24 -03:00
refactor: make MempoolMutex() public
for use in the following unittests.
This commit is contained in:
parent
7300ced9de
commit
d70919a88f
1 changed files with 6 additions and 6 deletions
|
@ -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…
Add table
Reference in a new issue