MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / DumpDbOne

Function DumpDbOne

src/rpc/rpcmisc.cpp:409–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407 str += DbCacheToString(pCdMan->db->cache) + "\n";
408
409static 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
424static void DumpDbAll(FILE *f) {
425 string str = "";

Callers 1

dumpdbFunction · 0.85

Calls 4

DbCacheToStringFunction · 0.85
JSONRPCErrorFunction · 0.85
dataMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected