MCPcopy Create free account
hub / github.com/LUX-Core/lux / GetJSON

Method GetJSON

src/test/script_tests.cpp:447–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

445 }
446
447 UniValue GetJSON()
448 {
449 DoPush();
450 UniValue array(UniValue::VARR);
451 if (!scriptWitness.stack.empty()) {
452 UniValue wit(UniValue::VARR);
453 for (unsigned i = 0; i < scriptWitness.stack.size(); i++) {
454 wit.push_back(HexStr(scriptWitness.stack[i]));
455 }
456 wit.push_back(ValueFromAmount(nValue));
457 array.push_back(wit);
458 }
459 array.push_back(FormatScript(spendTx.vin[0].scriptSig));
460 array.push_back(FormatScript(creditTx->vout[0].scriptPubKey));
461 array.push_back(FormatScriptFlags(flags));
462 array.push_back(FormatScriptError((ScriptError_t)scriptError));
463 array.push_back(comment);
464 return array;
465 }
466
467 std::string GetComment() const
468 {

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