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

Method GetContractData

src/tests/systestscript.cpp:322–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320 return ;
321 }
322 bool GetContractData(string srcipt,vector<unsigned char> key)
323 {
324 CRegID regid(srcipt);
325 if (regid.IsEmpty() == true) {
326 return false;
327 }
328 CContractDBCache contractScriptTemp(*pScriptDBTip, true);
329 if (!contractScriptTemp.HasContract(regid)) {
330 return false;
331 }
332 vector<unsigned char> value;
333 int tipH = chainActive.Height();
334 CDbOpLog operLog;
335 if (!contractScriptTemp.GetContractData(tipH,regid,key, value)) {
336 return false;
337 }
338 return true;
339 }
340 string CreatWriteTx(string &hash)
341 {
342 string shash = CreateRegScript("dsjkLDFfhenmx2JkFMdtJ22TYDvSGgmJem","unit_test.bin");

Callers

nothing calls this directly

Calls 3

HasContractMethod · 0.80
HeightMethod · 0.80
IsEmptyMethod · 0.45

Tested by

no test coverage detected