 |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
Go to the documentation of this file.
38 QString strUsingIX =
"";
39 if (signatures >= 0) {
43 return tr(
"conflicted");
45 return tr(
"%1/offline (verified via SwiftX)").arg(nDepth);
47 return tr(
"%1/confirmed (verified via SwiftX)").arg(nDepth);
49 return tr(
"%1 confirmations (verified via SwiftX)").arg(nDepth);
54 return tr(
"conflicted");
56 return tr(
"%1/offline (SwiftX verification in progress - %2 of %3 signatures)").arg(nDepth).arg(signatures).arg(
SWIFTTX_SIGNATURES_TOTAL);
58 return tr(
"%1/confirmed (SwiftX verification in progress - %2 of %3 signatures )").arg(nDepth).arg(signatures).arg(
SWIFTTX_SIGNATURES_TOTAL);
60 return tr(
"%1 confirmations (SwiftX verification in progress - %2 of %3 signatures)").arg(nDepth).arg(signatures).arg(
SWIFTTX_SIGNATURES_TOTAL);
64 return tr(
"conflicted");
66 return tr(
"%1/offline (SwiftX verification failed)").arg(nDepth);
68 return tr(
"%1/confirmed (SwiftX verification failed)").arg(nDepth);
70 return tr(
"%1 confirmations").arg(nDepth);
76 return tr(
"conflicted");
78 return tr(
"%1/offline").arg(nDepth);
80 return tr(
"%1/unconfirmed").arg(nDepth);
82 return tr(
"%1 confirmations").arg(nDepth);
92 strHTML.reserve(4000);
93 strHTML +=
"<html><font face='verdana, arial, helvetica, sans-serif'>";
98 CAmount nNet = nCredit - nDebit;
102 if (nRequests != -1) {
104 strHTML += tr(
", has not been successfully broadcast yet");
105 else if (nRequests > 0)
106 strHTML += tr(
", broadcast through %n node(s)",
"", nRequests);
116 strHTML +=
"<b>" + tr(
"Source") +
":</b> " + tr(
"Generated") +
"<br>";
127 strHTML +=
"<b>" + tr(
"From") +
":</b> " + tr(
"unknown") +
"<br>";
128 strHTML +=
"<b>" + tr(
"To") +
":</b> ";
134 strHTML +=
" (" + addressOwned +
")";
146 std::string strAddress = wtx.
mapValue[
"to"];
147 strHTML +=
"<b>" + tr(
"To") +
":</b> ";
164 strHTML +=
"<b>" + tr(
"Credit") +
":</b> ";
168 strHTML +=
"(" + tr(
"not accepted") +
")";
170 }
else if (nNet > 0) {
179 if (fAllFromMe > mine) fAllFromMe = mine;
185 if (fAllToMe > mine) fAllToMe = mine;
190 strHTML +=
"<b>" + tr(
"From") +
":</b> " + tr(
"watch-only") +
"<br>";
205 strHTML +=
"<b>" + tr(
"To") +
":</b> ";
210 strHTML +=
" (own address)";
212 strHTML +=
" (watch-only)";
225 CAmount nValue = nCredit - nChange;
241 if (wallet->
IsMine(txout))
256 strHTML +=
"<b>" + tr(
"Transaction ID") +
":</b> " + rec->
getTxID() +
"<br>";
257 strHTML +=
"<b>" + tr(
"Output index") +
":</b> " + QString::number(rec->
getOutputIndex()) +
"<br>";
261 if (
r.first ==
"Message")
262 strHTML +=
"<br><b>" + tr(
"Message") +
":</b><br>" +
GUIUtil::HtmlEscape(
r.second,
true) +
"<br>";
266 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>";
278 if (wallet->
IsMine(txout))
281 strHTML +=
"<br><b>" + tr(
"Transaction") +
":</b><br>";
284 strHTML +=
"<br><b>" + tr(
"Inputs") +
":</b>";
292 if (prevout.
n < prev.
vout.size()) {
299 strHTML += QString::fromStdString(
CBitcoinAddress(address).ToString());
303 strHTML = strHTML +
" IsWatchOnly=" + (wallet->
IsMine(vout) &
ISMINE_WATCH_ONLY ? tr(
"true") : tr(
"false")) +
"</li>";
311 strHTML +=
"</font></html>";
An input of a transaction.
isminetype IsMine(const CKeyStore &keystore, const CTxDestination &dest)
isminetype IsMine(const CTxIn &txin) const
CChain chainActive
The currently-connected chain of blocks.
base58-encoded PRCY addresses.
BCLog::Logger *const g_logger
NOTE: the logger instances is leaked on exit.
isminetype
IsMine() return codes.
CAmount GetValueOut() const
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.
UI model for a transaction.
#define SWIFTTX_SIGNATURES_TOTAL
void const uint64_t uint64_t * r
RecursiveMutex cs_main
Global state.
std::vector< CTxOut > vout
unspent transaction outputs; spent outputs are .IsNull(); spent outputs at the end of the array are d...
unsigned int nTimeReceived
#define SWIFTTX_SIGNATURES_REQUIRED
int COINBASE_MATURITY() const
CAmount GetCredit(const isminefilter &filter) const
An output of a transaction.
std::vector< CTxOut > vout
CAmount GetCredit(const CTransaction &tx, const CTxOut &txout, const isminefilter &filter) const
CAmount GetDebit(const isminefilter &filter) const
bool GetBoolArg(const std::string &strArg, bool fDefault)
Return boolean argument or default value.
#define PAIRTYPE(t1, t2)
This is needed because the foreach macro can't get over the comma in pair<t1, t2>
int64_t CAmount
Amount in PRCY (Can be negative)
CCoinsViewCache * pcoinsTip
Global variable that points to the active CCoinsView (protected by cs_main)
#define AssertLockHeld(cs)
std::vector< std::pair< std::string, std::string > > vOrderForm
int64_t GetTxTime() const
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...
CAmount GetDebit(const CTxIn &txin, const isminefilter &filter) const
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.
int64_t GetAdjustedTime()
bool DefaultShrinkDebugFile() const
std::string ToString() const
QString HtmlEscape(const QString &str, bool fMultiLine)
int GetBlocksToMaturity() const
CAmount GetChange() const
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
int GetTransactionLockSignatures() const
const CChainParams & Params()
Return the currently selected parameters.
bool IsInMainChain() const
static QString FormatTxStatus(const CWalletTx &wtx)
bool IsTransactionLockTimedOut() const
COutPoint findMyOutPoint(const CTxIn &txin) const
static QString formatHtmlWithUnit(int unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=separatorStandard)
QString dateTimeStr(const QDateTime &date)
An outpoint - a combination of a transaction hash and an index n into its vout.
static QString toHTML(CWallet *wallet, CWalletTx &wtx, TransactionRecord *rec, int unit)
int GetRequestCount() const
QString getTxID() const
Return the unique identifier for this transaction (part)
CTxDestination Get() const
bool GetCoins(const uint256 &txid, CCoins &coins) const
Retrieve the CCoins (unspent transaction outputs) for a given txid.
CAmount getCTxOutValue(const CTransaction &tx, const CTxOut &out) const
std::map< CTxDestination, CAddressBookData > mapAddressBook