| 71 | } |
| 72 | |
| 73 | void CCoinsViewDB::ResizeCache(size_t new_cache_size) |
| 74 | { |
| 75 | // We can't do this operation with an in-memory DB since we'll lose all the coins upon |
| 76 | // reset. |
| 77 | if (!m_db_params.memory_only) { |
| 78 | LOCK(m_db_mutex); |
| 79 | // Have to do a reset first to get the original `m_db` state to release its |
| 80 | // filesystem lock. |
| 81 | m_db.reset(); |
| 82 | m_db_params.cache_bytes = new_cache_size; |
| 83 | m_db_params.wipe_data = false; |
| 84 | m_db = std::make_unique<CDBWrapper>(m_db_params); |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | std::optional<Coin> CCoinsViewDB::GetCoin(const COutPoint& outpoint) const |
| 89 | { |
no test coverage detected