mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Pass serialization flags and whether to include hex to TxToUniv
This commit is contained in:
@@ -41,7 +41,7 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& entry)
|
||||
// Blockchain contextual information (confirmations and blocktime) is not
|
||||
// available to code in bitcoin-common, so we query them here and push the
|
||||
// data into the returned UniValue.
|
||||
TxToUniv(tx, uint256(), entry);
|
||||
TxToUniv(tx, uint256(), entry, true, RPCSerializationFlags());
|
||||
|
||||
if (!hashBlock.IsNull()) {
|
||||
entry.push_back(Pair("blockhash", hashBlock.GetHex()));
|
||||
@@ -480,7 +480,7 @@ UniValue decoderawtransaction(const JSONRPCRequest& request)
|
||||
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
|
||||
|
||||
UniValue result(UniValue::VOBJ);
|
||||
TxToUniv(CTransaction(std::move(mtx)), uint256(), result);
|
||||
TxToUniv(CTransaction(std::move(mtx)), uint256(), result, false);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user