MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / GetJSON

Method GetJSON

src/test/script_tests.cpp:478–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476 }
477
478 UniValue GetJSON()
479 {
480 DoPush();
481 UniValue array(UniValue::VARR);
482 if (!scriptWitness.stack.empty()) {
483 UniValue wit(UniValue::VARR);
484 for (unsigned i = 0; i < scriptWitness.stack.size(); i++) {
485 wit.push_back(HexStr(scriptWitness.stack[i]));
486 }
487 wit.push_back(ValueFromAmount(nValue));
488 array.push_back(wit);
489 }
490 array.push_back(FormatScript(spendTx.vin[0].scriptSig));
491 array.push_back(FormatScript(creditTx->vout[0].scriptPubKey));
492 array.push_back(FormatScriptFlags(flags));
493 array.push_back(FormatScriptError((ScriptError_t)scriptError));
494 array.push_back(comment);
495 return array;
496 }
497
498 std::string GetComment() const
499 {

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 8

HexStrFunction · 0.85
ValueFromAmountFunction · 0.85
FormatScriptFunction · 0.85
FormatScriptFlagsFunction · 0.85
FormatScriptErrorFunction · 0.85
emptyMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected