11 #include <validation.h> 30 QList<TransactionRecord> parts;
31 int64_t nTime = wtx.
time;
34 CAmount nNet = nCredit - nDebit;
36 std::map<std::string, std::string> mapValue = wtx.
value_map;
43 for(
unsigned int i = 0; i < wtx.
tx->vout.size(); i++)
45 const CTxOut& txout = wtx.
tx->vout[i];
83 if(fAllFromMe > mine) fAllFromMe = mine;
90 if(fAllToMe > mine) fAllToMe = mine;
93 if (fAllFromMe && fAllToMe)
99 -(nDebit - nChange), nCredit - nChange));
107 CAmount nTxFee = nDebit - wtx.
tx->GetValueOut();
109 for (
unsigned int nOut = 0; nOut < wtx.
tx->vout.size(); nOut++)
111 const CTxOut& txout = wtx.
tx->vout[nOut];
bool statusUpdateNeeded(int numBlocks) const
Return whether a status update is needed.
Confirmed, but waiting for the recommended number of confirmations.
std::vector< CTxDestination > txout_address
Transaction not yet final, waiting for block.
int idx
Subtransaction index, for sort key.
unsigned int time_received
QString getTxHash() const
Return the unique identifier for this transaction (part)
Generated (mined) transactions.
std::vector< isminetype > txin_is_mine
std::vector< isminetype > txout_is_mine
Have 6 or more confirmations (normal tx) or fully mature (mined tx)
std::string sortKey
Sorting key based on status.
static QList< TransactionRecord > decomposeTransaction(const interfaces::WalletTx &wtx)
Not yet mined into a block.
int64_t CAmount
Amount in satoshis (Can be negative)
void updateStatus(const interfaces::WalletTxStatus &wtx, int numBlocks, int64_t adjustedTime)
Update status from core wallet tx.
int getOutputIndex() const
Return the output index of the subtransaction.
UI model for a transaction.
TransactionStatus status
Status: can change with block chain update.
isminetype
IsMine() return codes.
boost::variant< CNoDestination, CKeyID, CScriptID, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessUnknown > CTxDestination
A txout script template with a specific destination.
bool countsForBalance
Transaction counts towards available balance.
An output of a transaction.
std::string ToString() const
int cur_num_blocks
Current number of blocks (to know whether cached status is still valid)
Normal (sent/received) transactions.
static bool showTransaction()
Decompose CWallet transaction to model transaction records.
std::vector< isminetype > txout_address_is_mine
Conflicts with other transaction or mempool.
bool involvesWatchAddress
Whether the transaction was sent/received with a watch-only address.
std::string EncodeDestination(const CTxDestination &dest)
std::map< std::string, std::string > value_map
qint64 open_for
Timestamp if status==OpenUntilDate, otherwise number of additional blocks that need to be mined befor...
Abandoned from the wallet.
Updated transaction status.
static const int RecommendedNumConfirmations
Number of confirmation recommended for accepting a transaction.