Tracking issue for the follow up comments in #22904. It seems that PR has introduced lock contentions, and/or the `checkqueue_tests` are now behaving very poorly, with long runtimes and generating GBs of log output in some cases. See comments starting here: https://github.com/bitcoin/bitcoin/pull/22904#issuecomment-930466935.

cc @ajtowns @theuni @martinus  
MemoryCheck(const MemoryCheck& x)
    {
        
        
        
        
        fake_allocated_memory.fetch_add(b, std::memory_order_relaxed);
    };
    MemoryCheck(bool b_) : b(b_)
    {
        fake_allocated_memory.fetch_add(b, std::memory_order_relaxed);
    };
    ~MemoryCheck()
    {
        fake_allocated_memory.fetch_sub(b, std::memory_order_relaxed);
    };
    void swap(MemoryCheck& x) { std::swap(b, x.b); };
};
struct FrozenCleanupCheck {
    static std::atomic<uint64_t> nFrozen;
    static std::condition_variable cv;
    static std::mutex m;
    
    
    bool should_freeze {false};
    bool operator()() const
    {
        return true;
    }
    FrozenCleanupCheck() {}