 |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
Go to the documentation of this file.
22 QList<TransactionRecord> parts;
26 CAmount nNet = nCredit - nDebit;
28 std::map<std::string, std::string> mapValue = wtx.
mapValue;
36 for (
unsigned int i = 1; i < wtx.
vout.size(); i++) {
39 if (
IsMine(*wallet, outAddress)) {
67 sub.
idx = parts.size();
92 if (wallet->
IsMine(txin)) {
97 if (fAllFromMe > mine) fAllFromMe = mine;
103 if (wallet->
IsMine(txout)) {
109 if (fAllToMe > mine) fAllToMe = mine;
112 if (fAllFromMe && fAllToMe) {
119 for (
unsigned int nOut = 0; nOut < wtx.
vout.size(); nOut++) {
121 sub.
idx = parts.size();
133 sub.
debit = nCredit - nChange;
137 }
else if (fAllFromMe) {
143 for (
unsigned int nOut = 0; nOut < wtx.
vout.size(); nOut++) {
146 sub.
idx = parts.size();
149 if (wallet->
IsMine(txout)) {
197 pindex = (*mi).second;
201 (pindex ? pindex->
nHeight : std::numeric_limits<int>::max()),
211 if (wtx.
nLockTime < LOCKTIME_THRESHOLD) {
An input of a transaction.
isminetype IsMine(const CKeyStore &keystore, const CTxDestination &dest)
int idx
Subtransaction index, for sort key.
bool statusUpdateNeeded()
Return whether a status update is needed.
std::string sortKey
Sorting key based on status.
@ OpenUntilDate
Normal (sent/received) transactions.
isminetype IsMine(const CTxIn &txin) const
TransactionStatus status
Status: can change with block chain update.
CChain chainActive
The currently-connected chain of blocks.
base58-encoded PRCY addresses.
int nHeight
height of the entry in the chain. The genesis block has height 0
@ Conflicted
Conflicts with other transaction or mempool.
int64_t GetComputedTxTime() const
isminetype
IsMine() return codes.
void updateStatus(const CWalletTx &wtx)
Update status from core wallet tx.
bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime)
Check if transaction is final and can be included in a block with the specified height and time.
std::string ToString() const
static const int RecommendedNumConfirmations
Number of confirmation recommended for accepting a transaction.
UI model for a transaction.
@ MaturesWarning
Transaction will likely not mature because no nodes have confirmed.
RecursiveMutex cs_main
Global state.
unsigned int nTimeReceived
qint64 open_for
Timestamp if status==OpenUntilDate, otherwise number of additional blocks that need to be mined befor...
CAmount GetCredit(const isminefilter &filter) const
An output of a transaction.
std::vector< CTxOut > vout
CAmount GetDebit(const isminefilter &filter) const
bool involvesWatchAddress
Whether the transaction was sent/received with a watch-only address.
int64_t CAmount
Amount in PRCY (Can be negative)
#define AssertLockHeld(cs)
256-bit unsigned big integer.
@ Immature
Generated (mined) transactions.
bool ExtractDestination(const CScript &scriptPubKey, CTxDestination &addressRet)
@ ISMINE_WATCH_ONLY
Indicates that we dont know how to create a scriptSig that would solve this if we were given the appr...
boost::variant< CNoDestination, CKeyID, CScriptID > CTxDestination
A txout script template with a specific destination.
int GetDepthInMainChain(const CBlockIndex *&pindexRet, bool enableIX=true) const
Return depth of transaction in blockchain: -1 : not in blockchain, and not in memory pool (conflicted...
int Height() const
Return the maximal height in the chain.
@ OpenUntilBlock
Transaction not yet final, waiting for block.
@ Confirmed
Have 6 or more confirmations (normal tx) or fully mature (mined tx)
int64_t GetAdjustedTime()
@ Confirming
Confirmed, but waiting for the recommended number of confirmations.
int GetBlocksToMaturity() const
static QList< TransactionRecord > decomposeTransaction(const CWallet *wallet, const CWalletTx &wtx)
Decompose CWallet transaction to model transaction records.
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,...
A transaction with a bunch of additional info that only the owner cares about.
int getOutputIndex() const
Return the output index of the subtransaction
@ Offline
Not sent to any other nodes.
bool IsInMainChain() const
const uint256 & GetHash() const
@ NotAccepted
Mined but not accepted.
int GetRequestCount() const
bool countsForBalance
Transaction counts towards available balance.
@ Unconfirmed
Not yet mined into a block.
QString getTxID() const
Return the unique identifier for this transaction (part)
The block chain is a tree shaped structure starting with the genesis block at the root,...
int cur_num_blocks
Current number of blocks (to know whether cached status is still valid)
CAmount getCTxOutValue(const CTransaction &tx, const CTxOut &out) const
std::string ToString() const