CWalletTx tx; double totalCredit = tx.GetCredit();
CWalletTx tx; std::vectorIn this example, we create a new CWalletTx object and retrieve the total credit received by the transaction, filtered by a list of CTxDestination addresses. Package Library: Bitcoin Core Librarydestinations; double totalCredit = tx.GetCredit(true, destinations);