26 return tr(
"%1/offline").arg(nDepth);
28 return tr(
"%1/unconfirmed").arg(nDepth);
30 return tr(
"%1 confirmations").arg(nDepth);
40 strHTML.reserve(4000);
41 strHTML +=
"<html><font face='verdana, arial, helvetica, sans-serif'>";
46 int64 nNet = nCredit - nDebit;
53 strHTML += tr(
", has not been successfully broadcast yet");
54 else if (nRequests > 0)
55 strHTML += tr(
", broadcast through %n node(s)",
"", nRequests);
66 strHTML +=
"<b>" + tr(
"Source") +
":</b> " + tr(
"Generated") +
"<br>";
88 strHTML +=
"<b>" + tr(
"From") +
":</b> " + tr(
"unknown") +
"<br>";
89 strHTML +=
"<b>" + tr(
"To") +
":</b> ";
94 strHTML +=
" (" + tr(
"own address") +
")";
110 std::string strAddress = wtx.
mapValue[
"to"];
111 strHTML +=
"<b>" + tr(
"To") +
":</b> ";
126 int64 nUnmatured = 0;
129 strHTML +=
"<b>" + tr(
"Credit") +
":</b> ";
133 strHTML +=
"(" + tr(
"not accepted") +
")";
145 bool fAllFromMe =
true;
146 BOOST_FOREACH(
const CTxIn& txin, wtx.
vin)
147 fAllFromMe = fAllFromMe && wallet->
IsMine(txin);
149 bool fAllToMe =
true;
151 fAllToMe = fAllToMe && wallet->
IsMine(txout);
160 if (wallet->
IsMine(txout))
169 strHTML +=
"<b>" + tr(
"To") +
":</b> ";
184 int64 nValue = nCredit - nChange;
198 BOOST_FOREACH(
const CTxIn& txin, wtx.
vin)
202 if (wallet->
IsMine(txout))
217 strHTML +=
"<b>" + tr(
"Transaction ID") +
":</b> " + wtx.
GetHash().
ToString().c_str() +
"<br>";
220 strHTML +=
"<br>" + tr(
"Generated coins must mature 120 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.") +
"<br>";
227 strHTML +=
"<hr><br>" + tr(
"Debug information") +
"<br><br>";
228 BOOST_FOREACH(
const CTxIn& txin, wtx.
vin)
235 strHTML +=
"<br><b>" + tr(
"Transaction") +
":</b><br>";
238 strHTML +=
"<br><b>" + tr(
"Inputs") +
":</b>";
243 BOOST_FOREACH(
const CTxIn& txin, wtx.
vin)
250 if (prevout.
n < prev.
vout.size())
259 strHTML += QString::fromStdString(
CBitcoinAddress(address).ToString());
262 strHTML = strHTML +
" IsMine=" + (wallet->
IsMine(vout) ? tr(
"true") : tr(
"false")) +
"</li>";
271 strHTML +=
"</font></html>";
static QString toHTML(CWallet *wallet, CWalletTx &wtx)
bool IsFinal(int nBlockHeight=0, int64 nBlockTime=0) const
bool IsMine(const CTxIn &txin) const
static QString formatWithUnit(int unit, qint64 amount, bool plussign=false)
Format as string (with unit)
std::vector< CTxOut > vout
CCriticalSection cs_wallet
QString dateTimeStr(const QDateTime &date)
QString HtmlEscape(const QString &str, bool fMultiLine)
pruned version of CTransaction: only retains metadata and unspent transaction outputs ...
int64 GetDebit(const CTxIn &txin) const
CTxDestination Get() const
bool GetCoins(const uint256 &txid, CCoins &coins)
int64 GetCredit(bool fUseCache=true) const
int GetBlocksToMaturity() const
int GetRequestCount() const
bool IsInMainChain() const
An input of a transaction.
std::vector< CTxOut > vout
An output of a transaction.
int64 GetValueOut() const
Amount of bitcoins spent by this 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)
int64 GetCredit(const CTxOut &txout) const
std::string ToString() const
A transaction with a bunch of additional info that only the owner cares about.
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
std::map< CTxDestination, std::string > mapAddressBook
boost::variant< CNoDestination, CKeyID, CScriptID > CTxDestination
A txout script template with a specific destination.
static QString FormatTxStatus(const CWalletTx &wtx)
unsigned int nTimeReceived