remove obsoleted TxOrphanage::m_mutex

The TxOrphanage is now guarded externally by m_tx_download_mutex.
This commit is contained in:
glozow
2024-05-16 10:32:51 +01:00
parent 61745c7451
commit 6ff84069a5
3 changed files with 20 additions and 48 deletions

View File

@@ -21,15 +21,13 @@ BOOST_FIXTURE_TEST_SUITE(orphanage_tests, TestingSetup)
class TxOrphanageTest : public TxOrphanage
{
public:
inline size_t CountOrphans() const EXCLUSIVE_LOCKS_REQUIRED(!m_mutex)
inline size_t CountOrphans() const
{
LOCK(m_mutex);
return m_orphans.size();
}
CTransactionRef RandomOrphan() EXCLUSIVE_LOCKS_REQUIRED(!m_mutex)
CTransactionRef RandomOrphan()
{
LOCK(m_mutex);
std::map<Wtxid, OrphanTx>::iterator it;
it = m_orphans.lower_bound(Wtxid::FromUint256(InsecureRand256()));
if (it == m_orphans.end())