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

Method GetJSON

src/test/script_tests.cpp:389–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

387 }
388
389 UniValue GetJSON()
390 {
391 DoPush();
392 UniValue array(UniValue::VARR);
393 if (!scriptWitness.stack.empty()) {
394 UniValue wit(UniValue::VARR);
395 for (unsigned i = 0; i < scriptWitness.stack.size(); i++) {
396 wit.push_back(HexStr(scriptWitness.stack[i]));
397 }
398 wit.push_back(ValueFromAmount(nValue));
399 array.push_back(std::move(wit));
400 }
401 array.push_back(FormatScript(spendTx.vin[0].scriptSig));
402 array.push_back(FormatScript(creditTx->vout[0].scriptPubKey));
403 array.push_back(FormatScriptFlags(flags));
404 array.push_back(FormatScriptError((ScriptError_t)scriptError));
405 array.push_back(comment);
406 return array;
407 }
408
409 std::string GetComment() const
410 {

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