rpc: add "ischange: true" in wallet gettransaction decoded tx output

This commit is contained in:
Matthew Zipkin committed 2025-10-29 12:09:19 -04:00
1 parent c779ee3a40
commit d633db5416
5 files changed
+25 -6

No files matched your search

+10 -1
View File
@@ -796,7 +796,16 @@ RPCHelpMan gettransaction()
if (verbose) {
UniValue decoded(UniValue::VOBJ);
TxToUniv(*wtx.tx, /*block_hash=*/uint256(), /*entry=*/decoded, /*include_hex=*/false);
TxToUniv(*wtx.tx,
/*block_hash=*/uint256(),
/*entry=*/decoded,
/*include_hex=*/false,
/*txundo=*/nullptr,
/*verbosity=*/TxVerbosity::SHOW_DETAILS,
/*is_change_func=*/[&pwallet](const CTxOut& txout) EXCLUSIVE_LOCKS_REQUIRED(pwallet->cs_wallet) {
AssertLockHeld(pwallet->cs_wallet);
return OutputIsChange(*pwallet, txout);
});
entry.pushKV("decoded", std::move(decoded));
}