diff options
author | Gregory Sanders <gsanders87@gmail.com> | 2016-07-20 14:49:32 -0400 |
---|---|---|
committer | Gregory Sanders <gsanders87@gmail.com> | 2017-05-17 13:30:42 -0400 |
commit | 9f7341b0787e581f7b7b9fec294ca4d3859299b3 (patch) | |
tree | b803c98969b84a2c9b5131224184b8e40997d38d /src/rpc | |
parent | 776ba233e939fe41a74c6b2632b93a0679a32c71 (diff) |
Add witness data output to TxInError messages
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/rawtransaction.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 3947fb3f7d..683bb25246 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -523,6 +523,11 @@ static void TxInErrorToJSON(const CTxIn& txin, UniValue& vErrorsRet, const std:: UniValue entry(UniValue::VOBJ); entry.push_back(Pair("txid", txin.prevout.hash.ToString())); entry.push_back(Pair("vout", (uint64_t)txin.prevout.n)); + UniValue witness(UniValue::VARR); + for (unsigned int i = 0; i < txin.scriptWitness.stack.size(); i++) { + witness.push_back(HexStr(txin.scriptWitness.stack[i].begin(), txin.scriptWitness.stack[i].end())); + } + entry.push_back(Pair("witness", witness)); entry.push_back(Pair("scriptSig", HexStr(txin.scriptSig.begin(), txin.scriptSig.end()))); entry.push_back(Pair("sequence", (uint64_t)txin.nSequence)); entry.push_back(Pair("error", strMessage)); |