[#wallet-CachedTxGetAmounts]
= xref:wallet.adoc[wallet]::CachedTxGetAmounts
:relfileprefix: ../
:mrdocs:

Splits a wallet transaction into received and sent entries plus its fee&period;

== Synopsis

Declared in `&lt;wallet&sol;receive&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
CachedTxGetAmounts(
    xref:wallet/CWallet.adoc[CWallet] const& wallet,
    xref:wallet/CWalletTx.adoc[CWalletTx] const& wtx,
    std::list&lt;COutputEntry&gt;& listReceived,
    std::list&lt;COutputEntry&gt;& listSent,
    xref:CAmount.adoc[CAmount]& nFee,
    bool include&lowbar;change);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *wallet*
| The wallet that owns the transaction&period;
| *wtx*
| The wallet transaction to evaluate&period;
| *listReceived*
| Receives the outputs credited to the wallet&period;
| *listSent*
| Receives the outputs debited from the wallet&period;
| *nFee*
| Receives the fee paid by the transaction&period;
| *include&lowbar;change*
| Whether to include change outputs in the results&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
