26 QList<TransactionRecord> parts;
30 int64 nNet = nCredit - nDebit;
32 std::map<std::string, std::string> mapValue = wtx.
mapValue;
45 sub.
idx = parts.size();
71 bool fAllFromMe =
true;
72 BOOST_FOREACH(
const CTxIn& txin, wtx.
vin)
73 fAllFromMe = fAllFromMe && wallet->
IsMine(txin);
77 fAllToMe = fAllToMe && wallet->
IsMine(txout);
79 if (fAllFromMe && fAllToMe)
85 -(nDebit - nChange), nCredit - nChange));
94 for (
unsigned int nOut = 0; nOut < wtx.
vout.size(); nOut++)
98 sub.
idx = parts.size();
153 pindex = (*mi).second;
157 (pindex ? pindex->
nHeight : std::numeric_limits<int>::max()),
bool IsFinal(int nBlockHeight=0, int64 nBlockTime=0) const
#define strprintf(format,...)
int idx
Subtransaction index, for sort key.
bool IsMine(const CTxIn &txin) const
std::string getTxID()
Return the unique identifier for this transaction (part)
static bool showTransaction(const CWalletTx &wtx)
Decompose CWallet transaction to model transaction records.
int64 GetCredit(bool fUseCache=true) const
int GetBlocksToMaturity() const
int GetRequestCount() const
bool IsInMainChain() const
UI model for a transaction.
TransactionStatus status
Status: can change with block chain update.
static QList< TransactionRecord > decomposeTransaction(const CWallet *wallet, const CWalletTx &wtx)
An input of a transaction.
std::vector< CTxOut > vout
void updateStatus(const CWalletTx &wtx)
Update status from core wallet tx.
std::string ToString() const
An output of a transaction.
int64 GetValueOut() const
Amount of bitcoins spent by this transaction.
static const int NumConfirmations
Number of confirmation needed for transaction.
int cur_num_blocks
Current number of blocks (to know whether cached status is still valid)
A transaction with a bunch of additional info that only the owner cares about.
Transaction will likely not mature because no nodes have confirmed.
int64 open_for
Timestamp if status==OpenUntilDate, otherwise number of additional blocks that need to be mined befor...
The block chain is a tree shaped structure starting with the genesis block at the root...
std::string ToString() const
bool IsMine(const CKeyStore &keystore, const CTxDestination &dest)
bool ExtractDestination(const CScript &scriptPubKey, CTxDestination &addressRet)
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
int GetDepthInMainChain(CBlockIndex *&pindexRet) const
bool statusUpdateNeeded()
Return whether a status update is needed.
boost::variant< CNoDestination, CKeyID, CScriptID > CTxDestination
A txout script template with a specific destination.
unsigned int nTimeReceived
map< uint256, CBlockIndex * > mapBlockIndex