Changeset View
Changeset View
Standalone View
Standalone View
src/qt/transactionrecord.cpp
Show All 11 Lines | |||||
#include "wallet/wallet.h" | #include "wallet/wallet.h" | ||||
#include <cstdint> | #include <cstdint> | ||||
/** | /** | ||||
* Return positive answer if transaction should be shown in list. | * Return positive answer if transaction should be shown in list. | ||||
*/ | */ | ||||
bool TransactionRecord::showTransaction(const CWalletTx &wtx) { | bool TransactionRecord::showTransaction(const CWalletTx &wtx) { | ||||
if (wtx.IsCoinBase()) { | // There are currently no cases where we hide transactions, but we may want | ||||
// Ensures we show generated coins / mined transactions at depth 1 | // to use this in the future for things like RBF. | ||||
if (!wtx.IsInMainChain()) { | |||||
return false; | |||||
} | |||||
} | |||||
return true; | return true; | ||||
} | } | ||||
/** | /** | ||||
* Decompose CWallet transaction to model transaction records. | * Decompose CWallet transaction to model transaction records. | ||||
*/ | */ | ||||
QList<TransactionRecord> | QList<TransactionRecord> | ||||
TransactionRecord::decomposeTransaction(const CWallet *wallet, | TransactionRecord::decomposeTransaction(const CWallet *wallet, | ||||
▲ Show 20 Lines • Show All 193 Lines • Show Last 20 Lines |