MCPcopy Create free account
hub / github.com/Bitcoin-ABC/bitcoin-abc / GetJSON

Method GetJSON

src/test/script_tests.cpp:513–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

511 }
512
513 UniValue GetJSON() {
514 DoPush();
515 UniValue array(UniValue::VARR);
516 if (nValue != Amount::zero()) {
517 UniValue amount(UniValue::VARR);
518 amount.push_back(nValue);
519 array.push_back(std::move(amount));
520 }
521
522 array.push_back(FormatScript(spendTx.vin[0].scriptSig));
523 array.push_back(FormatScript(creditTx->vout[0].scriptPubKey));
524 array.push_back(FormatScriptFlags(flags));
525 array.push_back(FormatScriptError(scriptError));
526 array.push_back(comment);
527 return array;
528 }
529
530 std::string GetComment() const { return comment; }
531};

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 4

FormatScriptFunction · 0.85
FormatScriptFlagsFunction · 0.85
FormatScriptErrorFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected