| 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 | { |
no test coverage detected