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

Method testdeletmodifydb

src/tests/systestscript.cpp:387–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385 }
386
387 void testdeletmodifydb()
388 {
389 string writetxhash= "";
390 string scriptid = CreatWriteTx(writetxhash);
391 int height = chainActive.Height();
392
393 ///// 修改删除包
394 int param =17;
395 string temp = "";
396 temp += tinyformat::format("%02x%02x",param,11);
397 CreateTx(temp,"e21rEzVwkPFQYfgxcg7xLp7DKeYrW4Fpoz");
398 vector<unsigned char> key;
399 const char *key1="3_error";
400 key.insert(key.begin(),key1, key1 + strlen(key1) +1);
401 BOOST_CHECK(!GetContractData(scriptid,key));
402 CheckScriptDB(height,scriptid,writetxhash,true);
403 int modHeight = chainActive.Height();
404
405 // cout<<"end:"<<endl;
406 //// 遍历
407 int count = 15;
408 while(count > 1)
409 {
410 int param =18;
411 string temp = "";
412 temp += tinyformat::format("%02x",param);
413 CreateTx(temp,"e21rEzVwkPFQYfgxcg7xLp7DKeYrW4Fpoz");
414 // cout<<"cont:"<<endl;
415 // cout<<chainActive.Height()<<endl;
416 CheckScriptDB(height,scriptid,writetxhash,true);
417 count--;
418 }
419 }
420 void TestMinner()
421 {
422 string hash = "";

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected