37 return tr(
"conflicted");
39 return tr(
"%1/offline").arg(nDepth);
41 return tr(
"%1/unconfirmed").arg(nDepth);
43 return tr(
"%1 confirmations").arg(nDepth);
52 strHTML.reserve(4000);
53 strHTML +=
"<html><font face='verdana, arial, helvetica, sans-serif'>";
58 int64_t nNet = nCredit - nDebit;
65 strHTML += tr(
", has not been successfully broadcast yet");
66 else if (nRequests > 0)
67 strHTML += tr(
", broadcast through %n node(s)",
"", nRequests);
78 strHTML +=
"<b>" + tr(
"Source") +
":</b> " + tr(
"Generated") +
"<br>";
96 strHTML +=
"<b>" + tr(
"From") +
":</b> " + tr(
"unknown") +
"<br>";
97 strHTML +=
"<b>" + tr(
"To") +
":</b> ";
103 strHTML +=
" (" + addressOwned +
")";
116 std::string strAddress = wtx.
mapValue[
"to"];
117 strHTML +=
"<b>" + tr(
"To") +
":</b> ";
132 int64_t nUnmatured = 0;
135 strHTML +=
"<b>" + tr(
"Credit") +
":</b> ";
139 strHTML +=
"(" + tr(
"not accepted") +
")";
152 BOOST_FOREACH(
const CTxIn& txin, wtx.
vin)
155 if(fAllFromMe > mine) fAllFromMe = mine;
162 if(fAllToMe > mine) fAllToMe = mine;
168 strHTML +=
"<b>" + tr(
"From") +
":</b> " + tr(
"watch-only") +
"<br>";
186 strHTML +=
"<b>" + tr(
"To") +
":</b> ";
191 strHTML +=
" (own address)";
193 strHTML +=
" (watch-only)";
207 int64_t nValue = nCredit - nChange;
221 BOOST_FOREACH(
const CTxIn& txin, wtx.
vin)
225 if (wallet->
IsMine(txout))
244 if (r.first ==
"Message")
245 strHTML +=
"<br><b>" + tr(
"Message") +
":</b><br>" +
GUIUtil::HtmlEscape(r.second,
true) +
"<br>";
252 if (r.first ==
"PaymentRequest")
255 req.
parse(QByteArray::fromRawData(r.second.data(), r.second.size()));
264 quint32 numBlocksToMaturity = COINBASE_MATURITY + 1;
265 strHTML +=
"<br>" + tr(
"Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to \"not accepted\" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.").arg(QString::number(numBlocksToMaturity)) +
"<br>";
273 strHTML +=
"<hr><br>" + tr(
"Debug information") +
"<br><br>";
274 BOOST_FOREACH(
const CTxIn& txin, wtx.
vin)
281 strHTML +=
"<br><b>" + tr(
"Transaction") +
":</b><br>";
284 strHTML +=
"<br><b>" + tr(
"Inputs") +
":</b>";
287 BOOST_FOREACH(
const CTxIn& txin, wtx.
vin)
294 if (prevout.
n < prev.
vout.size())
306 strHTML = strHTML +
" IsMine=" + (wallet->
IsMine(vout) &
ISMINE_SPENDABLE ? tr(
"true") : tr(
"false")) +
"</li>";
307 strHTML = strHTML +
" IsWatchOnly=" + (wallet->
IsMine(vout) &
ISMINE_WATCH_ONLY ? tr(
"true") : tr(
"false")) +
"</li>";
315 strHTML +=
"</font></html>";
bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime)
int64_t GetCredit(const CTxOut &txout, const isminefilter &filter) const
int64_t GetValueOut() const
isminetype IsMine(const CTxIn &txin) const
int idx
Subtransaction index, for sort key.
int64_t GetChange() const
std::vector< CTxOut > vout
std::map< CTxDestination, CAddressBookData > mapAddressBook
CCriticalSection cs_wallet
Main wallet lock.
static QString formatWithUnit(int unit, qint64 amount, bool plussign=false)
Format as string (with unit)
isminetype IsMine(const CKeyStore &keystore, const CTxDestination &dest)
bool getMerchant(X509_STORE *certStore, QString &merchant) const
QString dateTimeStr(const QDateTime &date)
CTxDestination Get() const
QString HtmlEscape(const QString &str, bool fMultiLine)
pruned version of CTransaction: only retains metadata and unspent transaction outputs ...
CChain chainActive
The currently-connected chain of blocks.
bool GetCoins(const uint256 &txid, CCoins &coins)
int64_t GetDebit(const CTxIn &txin, const isminefilter &filter) const
isminetype
IsMine() return codes.
static X509_STORE * getCertStore()
#define AssertLockHeld(cs)
int GetBlocksToMaturity() const
int GetRequestCount() const
int Height() const
Return the maximal height in the chain.
bool IsInMainChain() const
UI model for a transaction.
int64_t GetAdjustedTime()
An input of a transaction.
std::vector< CTxOut > vout
static QString formatSubTxId(const uint256 &hash, int vout)
Format subtransaction id.
base58-encoded Anoncoin addresses.
An output of a transaction.
An outpoint - a combination of a transaction hash and an index n into its vout.
CCoinsViewCache * pcoinsTip
Global variable that points to the active CCoinsView (protected by cs_main)
bool parse(const QByteArray &data)
std::string ToString() const
A transaction with a bunch of additional info that only the owner cares about.
int64_t GetTxTime() const
boost::variant< CNoDestination, CKeyID, CScriptID > CTxDestination
A txout script template with a specific destination.
int64_t GetCredit(const isminefilter &filter) const
int64_t GetDebit(const isminefilter &filter) const
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
static QString FormatTxStatus(const CWalletTx &wtx)
unsigned int nTimeReceived
static QString toHTML(CWallet *wallet, CWalletTx &wtx, TransactionRecord *rec, int unit)
std::vector< std::pair< std::string, std::string > > vOrderForm