| 202 | } |
| 203 | |
| 204 | size_t CDBWrapper::DynamicMemoryUsage() const |
| 205 | { |
| 206 | std::string memory; |
| 207 | std::optional<size_t> parsed; |
| 208 | if (!pdb->GetProperty("leveldb.approximate-memory-usage", &memory) || !(parsed = ToIntegral<size_t>(memory))) { |
| 209 | LogPrint(BCLog::LEVELDB, "Failed to get approximate-memory-usage property\n"); |
| 210 | return 0; |
| 211 | } |
| 212 | return parsed.value(); |
| 213 | } |
| 214 | |
| 215 | // Prefixed with null character to avoid collisions with other keys |
| 216 | // |
nothing calls this directly
no test coverage detected