mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-09 18:00:13 +02:00
wallet: add wtxid in WalletTxToJSON
This commit is contained in:
@ -34,6 +34,7 @@ static void WalletTxToJSON(const CWallet& wallet, const CWalletTx& wtx, UniValue
|
|||||||
}
|
}
|
||||||
uint256 hash = wtx.GetHash();
|
uint256 hash = wtx.GetHash();
|
||||||
entry.pushKV("txid", hash.GetHex());
|
entry.pushKV("txid", hash.GetHex());
|
||||||
|
entry.pushKV("wtxid", wtx.GetWitnessHash().GetHex());
|
||||||
UniValue conflicts(UniValue::VARR);
|
UniValue conflicts(UniValue::VARR);
|
||||||
for (const uint256& conflict : wallet.GetTxConflicts(wtx))
|
for (const uint256& conflict : wallet.GetTxConflicts(wtx))
|
||||||
conflicts.push_back(conflict.GetHex());
|
conflicts.push_back(conflict.GetHex());
|
||||||
|
Reference in New Issue
Block a user