35 return tr(
"conflicted");
37 return tr(
"%1/offline").arg(nDepth);
39 return tr(
"%1/unconfirmed").arg(nDepth);
41 return tr(
"%1 confirmations").arg(nDepth);
50 strHTML.reserve(4000);
51 strHTML +=
"<html><font face='verdana, arial, helvetica, sans-serif'>";
56 int64_t nNet = nCredit - nDebit;
63 strHTML += tr(
", has not been successfully broadcast yet");
64 else if (nRequests > 0)
65 strHTML += tr(
", broadcast through %n node(s)",
"", nRequests);
76 strHTML +=
"<b>" + tr(
"Source") +
":</b> " + tr(
"Generated") +
"<br>";
98 strHTML +=
"<b>" + tr(
"From") +
":</b> " + tr(
"unknown") +
"<br>";
99 strHTML +=
"<b>" + tr(
"To") +
":</b> ";
104 strHTML +=
" (" + tr(
"own address") +
")";
120 std::string strAddress = wtx.
mapValue[
"to"];
121 strHTML +=
"<b>" + tr(
"To") +
":</b> ";
136 int64_t nUnmatured = 0;
139 strHTML +=
"<b>" + tr(
"Credit") +
":</b> ";
143 strHTML +=
"(" + tr(
"not accepted") +
")";
155 bool fAllFromMe =
true;
156 BOOST_FOREACH(
const CTxIn& txin, wtx.
vin)
157 fAllFromMe = fAllFromMe && wallet->
IsMine(txin);
159 bool fAllToMe =
true;
161 fAllToMe = fAllToMe && wallet->
IsMine(txout);
170 if (wallet->
IsMine(txout))
179 strHTML +=
"<b>" + tr(
"To") +
":</b> ";
194 int64_t nValue = nCredit - nChange;
208 BOOST_FOREACH(
const CTxIn& txin, wtx.
vin)
212 if (wallet->
IsMine(txout))
231 if (r.first ==
"Message")
232 strHTML +=
"<br><b>" + tr(
"Message") +
":</b><br>" +
GUIUtil::HtmlEscape(r.second,
true) +
"<br>";
239 if (r.first ==
"PaymentRequest")
242 req.
parse(QByteArray::fromRawData(r.second.data(), r.second.size()));
252 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>";
260 strHTML +=
"<hr><br>" + tr(
"Debug information") +
"<br><br>";
261 BOOST_FOREACH(
const CTxIn& txin, wtx.
vin)
268 strHTML +=
"<br><b>" + tr(
"Transaction") +
":</b><br>";
271 strHTML +=
"<br><b>" + tr(
"Inputs") +
":</b>";
274 BOOST_FOREACH(
const CTxIn& txin, wtx.
vin)
281 if (prevout.
n < prev.
vout.size())
290 strHTML += QString::fromStdString(
CBitcoinAddress(address).ToString());
293 strHTML = strHTML +
" IsMine=" + (wallet->
IsMine(vout) ? tr(
"true") : tr(
"false")) +
"</li>";
301 strHTML +=
"</font></html>";
bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime)
int64_t GetValueOut() const
static const int COINBASE_MATURITY
Coinbase transaction outputs can only be spent after this number of new blocks (network rule) ...
bool IsMine(const CTxIn &txin) const
static QString formatWithUnit(int unit, qint64 amount, bool plussign=false)
Format as string (with unit)
int64_t GetChange() const
std::vector< CTxOut > vout
int64_t GetCredit(const CTxOut &txout) const
std::map< CTxDestination, CAddressBookData > mapAddressBook
CCriticalSection cs_wallet
Main wallet lock.
bool getMerchant(X509_STORE *certStore, QString &merchant) const
QString dateTimeStr(const QDateTime &date)
QString HtmlEscape(const QString &str, bool fMultiLine)
base58-encoded Bitcoin addresses.
pruned version of CTransaction: only retains metadata and unspent transaction outputs ...
CTxDestination Get() const
CChain chainActive
The currently-connected chain of blocks.
bool GetCoins(const uint256 &txid, CCoins &coins)
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
int64_t GetAdjustedTime()
An input of a transaction.
std::vector< CTxOut > vout
static QString formatSubTxId(const uint256 &hash, int vout)
Format subtransaction id.
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)
int64_t GetDebit(const CTxIn &txin) const
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
static const unsigned int LOCKTIME_THRESHOLD
Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timest...
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
boost::variant< CNoDestination, CKeyID, CScriptID > CTxDestination
A txout script template with a specific destination.
static QString FormatTxStatus(const CWalletTx &wtx)
unsigned int nTimeReceived
int64_t GetCredit(bool fUseCache=true) const
static QString toHTML(CWallet *wallet, CWalletTx &wtx, int vout, int unit)
std::vector< std::pair< std::string, std::string > > vOrderForm