mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
scripted-diff: rename and de-globalise g_cs_orphans
-BEGIN VERIFY SCRIPT- sed -i -e 's/static RecursiveMutex/mutable Mutex/' src/txorphanage.h sed -i -e '/RecursiveMutex/d' src/txorphanage.cpp sed -i -e 's/g_cs_orphans/m_mutex/g' $(git grep -l g_cs_orphans src/) -END VERIFY SCRIPT-
This commit is contained in:
@@ -20,15 +20,15 @@ BOOST_FIXTURE_TEST_SUITE(orphanage_tests, TestingSetup)
|
||||
class TxOrphanageTest : public TxOrphanage
|
||||
{
|
||||
public:
|
||||
inline size_t CountOrphans() const EXCLUSIVE_LOCKS_REQUIRED(!g_cs_orphans)
|
||||
inline size_t CountOrphans() const EXCLUSIVE_LOCKS_REQUIRED(!m_mutex)
|
||||
{
|
||||
LOCK(g_cs_orphans);
|
||||
LOCK(m_mutex);
|
||||
return m_orphans.size();
|
||||
}
|
||||
|
||||
CTransactionRef RandomOrphan() EXCLUSIVE_LOCKS_REQUIRED(!g_cs_orphans)
|
||||
CTransactionRef RandomOrphan() EXCLUSIVE_LOCKS_REQUIRED(!m_mutex)
|
||||
{
|
||||
LOCK(g_cs_orphans);
|
||||
LOCK(m_mutex);
|
||||
std::map<uint256, OrphanTx>::iterator it;
|
||||
it = m_orphans.lower_bound(InsecureRand256());
|
||||
if (it == m_orphans.end())
|
||||
|
||||
Reference in New Issue
Block a user