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

Method testdb

src/tests/systestscript.cpp:355–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353 return scriptid;
354 }
355 void testdb()
356 {
357 string phash = "";
358 string scriptid = CreatWriteTx(phash);
359 int height = chainActive.Height();
360 int circle = 4;
361 while(circle--)
362 {
363 BOOST_CHECK(GenerateOneBlock());
364 }
365
366 int count = 15;
367 while(count > 1)
368 {
369 //// second tx
370 uint256 hash(uint256S(phash.c_str()));
371 int param =16;
372 string temp = "";
373 temp += tinyformat::format("%02x%s%02x",param,HexStr(hash),height);
374 // cout<<"cont:"<<temp<<endl;
375 CreateTx(temp,"e21rEzVwkPFQYfgxcg7xLp7DKeYrW4Fpoz");
376
377 vector<unsigned char> key;
378 const char *key1="2_error";
379 key.insert(key.begin(),key1, key1 + strlen(key1) +1);
380 BOOST_CHECK(!GetContractData(scriptid,key));
381
382 CheckScriptDB((height),scriptid,phash,false);
383 count--;
384 }
385 }
386
387 void testdeletmodifydb()
388 {

Callers

nothing calls this directly

Calls 6

uint256SFunction · 0.85
formatFunction · 0.85
HexStrFunction · 0.85
HeightMethod · 0.80
insertMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected