| 407 | str += DbCacheToString(pCdMan->db->cache) + "\n"; |
| 408 | |
| 409 | static void DumpDbOne(FILE *f, dbk::PrefixType prefixType, const string &prefixTypeStr) { |
| 410 | string str = ""; |
| 411 | switch (prefixType) { |
| 412 | DBK_PREFIX_CACHE_LIST(DUMP_DB_ONE); |
| 413 | case dbk::BLOCK_INDEX: |
| 414 | str = DbCacheToString(*pCdMan->pBlockIndexDb); |
| 415 | break; |
| 416 | default : |
| 417 | throw JSONRPCError(RPC_INVALID_PARAMS, strprintf("unsupported dump db data of key prefix type=%s", |
| 418 | prefixTypeStr)); |
| 419 | break; |
| 420 | } |
| 421 | fwrite(str.data(), 1, str.size(), f); |
| 422 | } |
| 423 | |
| 424 | static void DumpDbAll(FILE *f) { |
| 425 | string str = ""; |
no test coverage detected