diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2017-05-17 17:07:15 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2017-05-17 17:14:18 -0700 |
commit | e317c0d19201ff75fa7afedf93a9d1cd2c560af2 (patch) | |
tree | 77576f4640e31081588c712d4c8fedb8adbbb369 /src | |
parent | bee35299716cc72cb7d5bd4daa9fddca05c58378 (diff) | |
parent | 6e9e02665674209b0b43f2aebecc7bb71e527054 (diff) | |
download | bitcoin-e317c0d19201ff75fa7afedf93a9d1cd2c560af2.tar.xz |
Merge #8384: Add witness data output to TxInError messages
6e9e026 Expand signrawtransaction.py to cover error witness checking (Gregory Sanders)
9f7341b Add witness data output to TxInError messages (Gregory Sanders)
Tree-SHA512: 6f2a758544fa2657f3a57051bdb80fb14cb10501c8ef4ccbab7a62d4b6a823e74f40991c8796248865def24619b620b859dc2bb08dc2cc72511c1cf3897ab1a9
Diffstat (limited to 'src')
-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)); |