| 77 | m_is_memory(fMemory) { } |
| 78 | |
| 79 | void CCoinsViewDB::ResizeCache(size_t new_cache_size) |
| 80 | { |
| 81 | // We can't do this operation with an in-memory DB since we'll lose all the coins upon |
| 82 | // reset. |
| 83 | if (!m_is_memory) { |
| 84 | // Have to do a reset first to get the original `m_db` state to release its |
| 85 | // filesystem lock. |
| 86 | m_db.reset(); |
| 87 | m_db = std::make_unique<CDBWrapper>( |
| 88 | m_ldb_path, new_cache_size, m_is_memory, /*fWipe*/ false, /*obfuscate*/ true); |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | bool CCoinsViewDB::GetCoin(const COutPoint &outpoint, Coin &coin) const { |
| 93 | return m_db->Read(CoinEntry(&outpoint), coin); |
no test coverage detected