Changeset View
Changeset View
Standalone View
Standalone View
src/qt/transactionrecord.h
Show All 23 Lines | |||||
*/ | */ | ||||
class TransactionStatus { | class TransactionStatus { | ||||
public: | public: | ||||
TransactionStatus() | TransactionStatus() | ||||
: countsForBalance(false), sortKey(""), matures_in(0), | : countsForBalance(false), sortKey(""), matures_in(0), | ||||
status(Unconfirmed), depth(0), open_for(0), cur_num_blocks(-1) {} | status(Unconfirmed), depth(0), open_for(0), cur_num_blocks(-1) {} | ||||
enum Status { | enum Status { | ||||
/**< Have 6 or more confirmations (normal tx) or fully mature (mined tx) | /** | ||||
**/ | * Have 6 or more confirmations (normal tx) or fully mature (mined tx) | ||||
*/ | |||||
Confirmed, | Confirmed, | ||||
/// Normal (sent/received) transactions | /// Normal (sent/received) transactions | ||||
/**< Transaction not yet final, waiting for date */ | /** Transaction not yet final, waiting for date */ | ||||
OpenUntilDate, | OpenUntilDate, | ||||
/**< Transaction not yet final, waiting for block */ | /** Transaction not yet final, waiting for block */ | ||||
OpenUntilBlock, | OpenUntilBlock, | ||||
/**< Not yet mined into a block **/ | /** Not yet mined into a block **/ | ||||
Unconfirmed, | Unconfirmed, | ||||
/**< Confirmed, but waiting for the recommended number of confirmations | /** | ||||
**/ | * Confirmed, but waiting for the recommended number of confirmations | ||||
*/ | |||||
Confirming, | Confirming, | ||||
/**< Conflicts with other transaction or mempool **/ | /** Conflicts with other transaction or mempool */ | ||||
Conflicted, | Conflicted, | ||||
/**< Abandoned from the wallet **/ | /** Abandoned from the wallet */ | ||||
Abandoned, | Abandoned, | ||||
/// Generated (mined) transactions | /// Generated (mined) transactions | ||||
/**< Mined but waiting for maturity */ | /** Mined but waiting for maturity */ | ||||
Immature, | Immature, | ||||
/**< Mined but not accepted */ | /** Mined but not accepted */ | ||||
NotAccepted | NotAccepted | ||||
}; | }; | ||||
/// Transaction counts towards available balance | /// Transaction counts towards available balance | ||||
bool countsForBalance; | bool countsForBalance; | ||||
/// Sorting key based on status | /// Sorting key based on status | ||||
std::string sortKey; | std::string sortKey; | ||||
/** @name Generated (mined) transactions | /** @name Generated (mined) transactions | ||||
@{*/ | @{*/ | ||||
int matures_in; | int matures_in; | ||||
/**@}*/ | /**@}*/ | ||||
/** @name Reported status | /** @name Reported status | ||||
@{*/ | @{*/ | ||||
Status status; | Status status; | ||||
qint64 depth; | qint64 depth; | ||||
/**< Timestamp if status==OpenUntilDate, otherwise number of additional | /** | ||||
* blocks that need to be mined before finalization */ | * Timestamp if status==OpenUntilDate, otherwise number of additional | ||||
* blocks that need to be mined before finalization | |||||
*/ | |||||
qint64 open_for; | qint64 open_for; | ||||
/**@}*/ | /**@}*/ | ||||
/** Current number of blocks (to know whether cached status is still valid) | /** Current number of blocks (to know whether cached status is still valid) | ||||
*/ | */ | ||||
int cur_num_blocks; | int cur_num_blocks; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 76 Lines • Show Last 20 Lines |