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

Function cleandb

src/tests/scriptdb_tests.cpp:97–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97void cleandb(int nType, vector<unsigned char> vKey) {
98 vector<unsigned char> vScriptId = {0x01,0x00,0x00,0x00,0x02,0x00};
99 CRegID regScriptId(vScriptId);
100 CDbOpLog operlog;
101 if(0==nType) {
102 BOOST_CHECK(pscriptDBView->EraseContractData(regScriptId, vKey, operlog));
103 BOOST_CHECK(pscriptDBView->Flush());
104 BOOST_CHECK(pTestView->Flush());
105 }else if(1==nType) {
106 BOOST_CHECK(pscriptDBView->EraseContractData(regScriptId, vKey, operlog));
107 BOOST_CHECK(pscriptDBView->Flush());
108 }else {
109 BOOST_CHECK(pscriptDBView->EraseContractData(regScriptId, vKey, operlog));
110 }
111}
112
113void traversaldb(CContractDBCache *pScriptDB, bool needEqual) {
114 //

Callers 1

testscriptdatadbFunction · 0.85

Calls 2

EraseContractDataMethod · 0.45
FlushMethod · 0.45

Tested by

no test coverage detected