aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpc/transactions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/rpc/transactions.cpp')
-rw-r--r--src/wallet/rpc/transactions.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/rpc/transactions.cpp b/src/wallet/rpc/transactions.cpp
index eef2c13ee1..ad94ce4b32 100644
--- a/src/wallet/rpc/transactions.cpp
+++ b/src/wallet/rpc/transactions.cpp
@@ -34,6 +34,7 @@ static void WalletTxToJSON(const CWallet& wallet, const CWalletTx& wtx, UniValue
}
uint256 hash = wtx.GetHash();
entry.pushKV("txid", hash.GetHex());
+ entry.pushKV("wtxid", wtx.GetWitnessHash().GetHex());
UniValue conflicts(UniValue::VARR);
for (const uint256& conflict : wallet.GetTxConflicts(wtx))
conflicts.push_back(conflict.GetHex());
@@ -431,6 +432,7 @@ static const std::vector<RPCResult> TransactionDescriptionString()
{RPCResult::Type::NUM, "blockindex", /*optional=*/true, "The index of the transaction in the block that includes it."},
{RPCResult::Type::NUM_TIME, "blocktime", /*optional=*/true, "The block time expressed in " + UNIX_EPOCH_TIME + "."},
{RPCResult::Type::STR_HEX, "txid", "The transaction id."},
+ {RPCResult::Type::STR_HEX, "wtxid", "The hash of serialized transaction, including witness data."},
{RPCResult::Type::ARR, "walletconflicts", "Conflicting transaction ids.",
{
{RPCResult::Type::STR_HEX, "txid", "The transaction id."},