9 #include <validation.h> 45 QList<TransactionRecord> parts;
49 CAmount nNet = nCredit - nDebit;
51 std::map<std::string, std::string> mapValue = wtx.
mapValue;
58 for(
unsigned int i = 0; i < wtx.
tx->vout.size(); i++)
60 const CTxOut& txout = wtx.
tx->vout[i];
80 if(wtx.
tx->HasCreateOrCall())
114 for (
const CTxIn& txin : wtx.
tx->vin)
118 if(fAllFromMe > mine) fAllFromMe =
mine;
122 for (
const CTxOut& txout : wtx.
tx->vout)
126 if(fAllToMe > mine) fAllToMe =
mine;
129 if (fAllFromMe && fAllToMe)
135 -(nDebit - nChange), nCredit - nChange));
143 CAmount nTxFee = nDebit - wtx.
tx->GetValueOut();
145 for (
unsigned int nOut = 0; nOut < wtx.
tx->vout.size(); nOut++)
147 const CTxOut& txout = wtx.
tx->vout[nOut];
159 if(wtx.
tx->HasCreateOrCall())
188 if(wtx.
tx->HasCreateOrCall()){
227 pindex = (*mi).second;
241 if (wtx.
tx->nLockTime < LOCKTIME_THRESHOLD)
boost::variant< CNoDestination, CKeyID, CScriptID > CTxDestination
A txout script template with a specific destination.
Confirmed, but waiting for the recommended number of confirmations.
int GetDepthInMainChain(const CBlockIndex *&pindexRet) const
Return depth of transaction in blockchain: <0 : conflicts with a transaction this deep in the blockch...
Transaction not yet final, waiting for block.
int idx
Subtransaction index, for sort key.
QString getTxID() const
Return the unique identifier for this transaction (part)
Not sent to any other nodes.
Generated (mined) transactions.
const uint256 & GetHash() const
int getOutputIndex() const
Return the output index of the subtransaction.
Have 6 or more confirmations (normal tx) or fully mature (mined tx)
std::string sortKey
Sorting key based on status.
base58-encoded Fabcoin addresses.
std::string HexStr(const T itbegin, const T itend, bool fSpaces=false)
std::string toStringHash160(const CTxDestination &address)
Not yet mined into a block.
isminetype IsMine(const CKeyStore &keystore, const CScript &scriptPubKey, SigVersion sigversion)
int64_t GetTxTime() const
static bool showTransaction(const CWalletTx &wtx)
Decompose CWallet transaction to model transaction records.
CAmount GetCredit(const isminefilter &filter) const
CAmount GetDebit(const isminefilter &filter) const
filter decides which addresses will count towards the debit
mapValue_t mapValue
Key/value map with information about the transaction.
std::string ToString() const
int64_t CAmount
Amount in lius (Can be negative)
#define AssertLockHeld(cs)
int GetBlocksToMaturity() const
int Height() const
Return the maximal height in the chain.
bool IsInMainChain() const
UI model for a transaction.
bool CheckFinalTx(const CTransaction &tx, int flags)
Check if transaction will be final in the next block to be created.
TransactionStatus status
Status: can change with block chain update.
static QList< TransactionRecord > decomposeTransaction(const CWallet *wallet, const CWalletTx &wtx)
isminetype
IsMine() return codes.
An input of a transaction.
bool ExtractDestination(const CScript &scriptPubKey, CTxDestination &addressRet, txnouttype *typeRet)
bool countsForBalance
Transaction counts towards available balance.
void updateStatus(const CWalletTx &wtx)
Update status from core wallet tx.
std::string ToString() const
An output of a transaction.
CChain chainActive
The currently-connected chain of blocks (protected by cs_main).
int cur_num_blocks
Current number of blocks (to know whether cached status is still valid)
Normal (sent/received) transactions.
A transaction with a bunch of additional info that only the owner cares about.
bool GetKeyID(CKeyID &keyID) const
int GetRequestCount() const
Conflicts with other transaction or mempool.
The block chain is a tree shaped structure starting with the genesis block at the root...
int64_t GetAdjustedTime()
bool involvesWatchAddress
Whether the transaction was sent/received with a watch-only address.
A reference to a CKey: the Hash160 of its serialized public key.
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
bool statusUpdateNeeded()
Return whether a status update is needed.
std::map< uint256, CWalletTx > mapWallet
std::vector< unsigned char > valtype
isminetype IsMine(const CTxIn &txin) const
unsigned int nTimeReceived
time received by this node
struct evm_uint160be address(struct evm_env *env)
int nHeight
height of the entry in the chain. The genesis block has height 0
qint64 open_for
Timestamp if status==OpenUntilDate, otherwise number of additional blocks that need to be mined befor...
Abandoned from the wallet.
void mine(Client &c, int numBlocks)
static const int RecommendedNumConfirmations
Number of confirmation recommended for accepting a transaction.
Transaction will likely not mature because no nodes have confirmed.
CAmount GetChange() const