MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetJSON

Method GetJSON

src/test/script_tests.cpp:459–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

457 }
458
459 UniValue GetJSON()
460 {
461 DoPush();
462 UniValue array(UniValue::VARR);
463 if (!scriptWitness.stack.empty()) {
464 UniValue wit(UniValue::VARR);
465 for (unsigned i = 0; i < scriptWitness.stack.size(); i++) {
466 wit.push_back(HexStr(scriptWitness.stack[i]));
467 }
468 wit.push_back(ValueFromAmount(nValue));
469 array.push_back(wit);
470 }
471 array.push_back(FormatScript(spendTx.vin[0].scriptSig));
472 array.push_back(FormatScript(creditTx->vout[0].scriptPubKey));
473 array.push_back(FormatScriptFlags(flags));
474 array.push_back(FormatScriptError((ScriptError_t)scriptError));
475 array.push_back(comment);
476 return array;
477 }
478
479 std::string GetComment() const
480 {

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 8

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

Tested by

no test coverage detected