PRCYCoin  2.0.0.7rc1
P2P Digital Currency
transactiondesc.cpp
Go to the documentation of this file.
1 // Copyright (c) 2011-2014 The Bitcoin developers
2 // Copyright (c) 2014-2015 The Dash developers
3 // Copyright (c) 2015-2018 The PIVX developers
4 // Copyright (c) 2018-2020 The DAPS Project developers
5 // Distributed under the MIT/X11 software license, see the accompanying
6 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
7 
8 #include "transactiondesc.h"
9 
10 #include "bitcoinunits.h"
11 #include "guiutil.h"
12 #include "paymentserver.h"
13 #include "transactionrecord.h"
14 
15 #include "base58.h"
16 #include "wallet/db.h"
17 #include "main.h"
18 #include "script/script.h"
19 #include "timedata.h"
20 #include "guiinterface.h"
21 #include "util.h"
22 #include "wallet/wallet.h"
23 
24 #include <stdint.h>
25 #include <string>
26 
27 
29 {
31  if (!IsFinalTx(wtx, chainActive.Height() + 1)) {
32  if (wtx.nLockTime < LOCKTIME_THRESHOLD)
33  return tr("Open for %n more block(s)", "", wtx.nLockTime - chainActive.Height());
34  else
35  return tr("Open until %1").arg(GUIUtil::dateTimeStr(wtx.nLockTime));
36  } else {
37  int signatures = wtx.GetTransactionLockSignatures();
38  QString strUsingIX = "";
39  if (signatures >= 0) {
40  if (signatures >= SWIFTTX_SIGNATURES_REQUIRED) {
41  int nDepth = wtx.GetDepthInMainChain();
42  if (nDepth < 0)
43  return tr("conflicted");
44  else if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0)
45  return tr("%1/offline (verified via SwiftX)").arg(nDepth);
46  else if (nDepth < 6)
47  return tr("%1/confirmed (verified via SwiftX)").arg(nDepth);
48  else
49  return tr("%1 confirmations (verified via SwiftX)").arg(nDepth);
50  } else {
51  if (!wtx.IsTransactionLockTimedOut()) {
52  int nDepth = wtx.GetDepthInMainChain();
53  if (nDepth < 0)
54  return tr("conflicted");
55  else if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0)
56  return tr("%1/offline (SwiftX verification in progress - %2 of %3 signatures)").arg(nDepth).arg(signatures).arg(SWIFTTX_SIGNATURES_TOTAL);
57  else if (nDepth < 6)
58  return tr("%1/confirmed (SwiftX verification in progress - %2 of %3 signatures )").arg(nDepth).arg(signatures).arg(SWIFTTX_SIGNATURES_TOTAL);
59  else
60  return tr("%1 confirmations (SwiftX verification in progress - %2 of %3 signatures)").arg(nDepth).arg(signatures).arg(SWIFTTX_SIGNATURES_TOTAL);
61  } else {
62  int nDepth = wtx.GetDepthInMainChain();
63  if (nDepth < 0)
64  return tr("conflicted");
65  else if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0)
66  return tr("%1/offline (SwiftX verification failed)").arg(nDepth);
67  else if (nDepth < 6)
68  return tr("%1/confirmed (SwiftX verification failed)").arg(nDepth);
69  else
70  return tr("%1 confirmations").arg(nDepth);
71  }
72  }
73  } else {
74  int nDepth = wtx.GetDepthInMainChain();
75  if (nDepth < 0)
76  return tr("conflicted");
77  else if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0)
78  return tr("%1/offline").arg(nDepth);
79  else if (nDepth < 6)
80  return tr("%1/unconfirmed").arg(nDepth);
81  else
82  return tr("%1 confirmations").arg(nDepth);
83  }
84  }
85 }
86 
87 QString TransactionDesc::toHTML(CWallet* wallet, CWalletTx& wtx, TransactionRecord* rec, int unit)
88 {
89  QString strHTML;
90 
91  LOCK2(cs_main, wallet->cs_wallet);
92  strHTML.reserve(4000);
93  strHTML += "<html><font face='verdana, arial, helvetica, sans-serif'>";
94 
95  int64_t nTime = wtx.GetTxTime();
96  CAmount nCredit = wtx.GetCredit(ISMINE_ALL);
97  CAmount nDebit = wtx.GetDebit(ISMINE_ALL);
98  CAmount nNet = nCredit - nDebit;
99 
100  strHTML += "<b>" + tr("Status") + ":</b> " + FormatTxStatus(wtx);
101  int nRequests = wtx.GetRequestCount();
102  if (nRequests != -1) {
103  if (nRequests == 0)
104  strHTML += tr(", has not been successfully broadcast yet");
105  else if (nRequests > 0)
106  strHTML += tr(", broadcast through %n node(s)", "", nRequests);
107  }
108  strHTML += "<br>";
109 
110  strHTML += "<b>" + tr("Date") + ":</b> " + (nTime ? GUIUtil::dateTimeStr(nTime) : "") + "<br>";
111 
112  //
113  // From
114  //
115  if (wtx.IsCoinBase()) {
116  strHTML += "<b>" + tr("Source") + ":</b> " + tr("Generated") + "<br>";
117  } else if (wtx.mapValue.count("from") && !wtx.mapValue["from"].empty()) {
118  // Online transaction
119  strHTML += "<b>" + tr("From") + ":</b> " + GUIUtil::HtmlEscape(wtx.mapValue["from"]) + "<br>";
120  } else {
121  // Offline transaction
122  if (nNet > 0) {
123  // Credit
124  if (CBitcoinAddress(rec->address).IsValid()) {
125  CTxDestination address = CBitcoinAddress(rec->address).Get();
126  if (wallet->mapAddressBook.count(address)) {
127  strHTML += "<b>" + tr("From") + ":</b> " + tr("unknown") + "<br>";
128  strHTML += "<b>" + tr("To") + ":</b> ";
129  strHTML += GUIUtil::HtmlEscape(rec->address);
130  QString addressOwned = (::IsMine(*wallet, address) == ISMINE_SPENDABLE) ? tr("own address") : tr("watch-only");
131  if (!wallet->mapAddressBook[address].name.empty())
132  strHTML += " (" + addressOwned + ", " + tr("label") + ": " + GUIUtil::HtmlEscape(wallet->mapAddressBook[address].name) + ")";
133  else
134  strHTML += " (" + addressOwned + ")";
135  strHTML += "<br>";
136  }
137  }
138  }
139  }
140 
141  //
142  // To
143  //
144  if (wtx.mapValue.count("to") && !wtx.mapValue["to"].empty()) {
145  // Online transaction
146  std::string strAddress = wtx.mapValue["to"];
147  strHTML += "<b>" + tr("To") + ":</b> ";
148  CTxDestination dest = CBitcoinAddress(strAddress).Get();
149  if (wallet->mapAddressBook.count(dest) && !wallet->mapAddressBook[dest].name.empty())
150  strHTML += GUIUtil::HtmlEscape(wallet->mapAddressBook[dest].name) + " ";
151  strHTML += GUIUtil::HtmlEscape(strAddress) + "<br>";
152  }
153 
154  //
155  // Amount
156  //
157  if (wtx.IsCoinBase() && nCredit == 0) {
158  //
159  // Coinbase
160  //
161  CAmount nUnmatured = 0;
162  for (const CTxOut& txout : wtx.vout)
163  nUnmatured += wallet->GetCredit(wtx, txout, ISMINE_ALL);
164  strHTML += "<b>" + tr("Credit") + ":</b> ";
165  if (wtx.IsInMainChain())
166  strHTML += BitcoinUnits::formatHtmlWithUnit(unit, nUnmatured) + " (" + tr("matures in %n more block(s)", "", wtx.GetBlocksToMaturity()) + ")";
167  else
168  strHTML += "(" + tr("not accepted") + ")";
169  strHTML += "<br>";
170  } else if (nNet > 0) {
171  //
172  // Credit
173  //
174  strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, nNet) + "<br>";
175  } else {
176  isminetype fAllFromMe = ISMINE_SPENDABLE;
177  for (const CTxIn& txin : wtx.vin) {
178  isminetype mine = wallet->IsMine(txin);
179  if (fAllFromMe > mine) fAllFromMe = mine;
180  }
181 
182  isminetype fAllToMe = ISMINE_SPENDABLE;
183  for (const CTxOut& txout : wtx.vout) {
184  isminetype mine = wallet->IsMine(txout);
185  if (fAllToMe > mine) fAllToMe = mine;
186  }
187 
188  if (fAllFromMe) {
189  if (fAllFromMe == ISMINE_WATCH_ONLY)
190  strHTML += "<b>" + tr("From") + ":</b> " + tr("watch-only") + "<br>";
191 
192  //
193  // Debit
194  //
195  for (const CTxOut& txout : wtx.vout) {
196  // Ignore change
197  isminetype toSelf = wallet->IsMine(txout);
198  if ((toSelf == ISMINE_SPENDABLE) && (fAllFromMe == ISMINE_SPENDABLE))
199  continue;
200 
201  if (!wtx.mapValue.count("to") || wtx.mapValue["to"].empty()) {
202  // Offline transaction
203  CTxDestination address;
204  if (ExtractDestination(txout.scriptPubKey, address)) {
205  strHTML += "<b>" + tr("To") + ":</b> ";
206  if (wallet->mapAddressBook.count(address) && !wallet->mapAddressBook[address].name.empty())
207  strHTML += GUIUtil::HtmlEscape(wallet->mapAddressBook[address].name) + " ";
208  strHTML += GUIUtil::HtmlEscape(CBitcoinAddress(address).ToString());
209  if (toSelf == ISMINE_SPENDABLE)
210  strHTML += " (own address)";
211  else if (toSelf == ISMINE_WATCH_ONLY)
212  strHTML += " (watch-only)";
213  strHTML += "<br>";
214  }
215  }
216 
217  strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -wallet->getCTxOutValue(wtx, txout)) + "<br>";
218  if (toSelf)
219  strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, wallet->getCTxOutValue(wtx, txout)) + "<br>";
220  }
221 
222  if (fAllToMe) {
223  // Payment to self
224  CAmount nChange = wtx.GetChange();
225  CAmount nValue = nCredit - nChange;
226  strHTML += "<b>" + tr("Total debit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -nValue) + "<br>";
227  strHTML += "<b>" + tr("Total credit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, nValue) + "<br>";
228  }
229 
230  CAmount nTxFee = nDebit - wtx.GetValueOut();
231  if (nTxFee > 0)
232  strHTML += "<b>" + tr("Transaction fee") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -nTxFee) + "<br>";
233  } else {
234  //
235  // Mixed debit transaction
236  //
237  for (const CTxIn& txin : wtx.vin)
238  if (wallet->IsMine(txin))
239  strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -wallet->GetDebit(txin, ISMINE_ALL)) + "<br>";
240  for (const CTxOut& txout : wtx.vout)
241  if (wallet->IsMine(txout))
242  strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, wallet->GetCredit(wtx, txout, ISMINE_ALL)) + "<br>";
243  }
244  }
245 
246  strHTML += "<b>" + tr("Net amount") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, nNet, true) + "<br>";
247 
248  //
249  // Message
250  //
251  if (wtx.mapValue.count("message") && !wtx.mapValue["message"].empty())
252  strHTML += "<br><b>" + tr("Message") + ":</b><br>" + GUIUtil::HtmlEscape(wtx.mapValue["message"], true) + "<br>";
253  if (wtx.mapValue.count("comment") && !wtx.mapValue["comment"].empty())
254  strHTML += "<br><b>" + tr("Comment") + ":</b><br>" + GUIUtil::HtmlEscape(wtx.mapValue["comment"], true) + "<br>";
255 
256  strHTML += "<b>" + tr("Transaction ID") + ":</b> " + rec->getTxID() + "<br>";
257  strHTML += "<b>" + tr("Output index") + ":</b> " + QString::number(rec->getOutputIndex()) + "<br>";
258 
259  // Message from normal prcycoin:URI (prcycoin:XyZ...?message=example)
260  Q_FOREACH (const PAIRTYPE(std::string, std::string) & r, wtx.vOrderForm)
261  if (r.first == "Message")
262  strHTML += "<br><b>" + tr("Message") + ":</b><br>" + GUIUtil::HtmlEscape(r.second, true) + "<br>";
263 
264  if (wtx.IsCoinBase()) {
265  quint32 numBlocksToMaturity = Params().COINBASE_MATURITY() + 1;
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>";
267  }
268 
269  //
270  // Debug view
271  //
272  if (!GetBoolArg("-shrinkdebugfile", g_logger->DefaultShrinkDebugFile())) {
273  strHTML += "<hr><br>" + tr("Debug information") + "<br><br>";
274  for (const CTxIn& txin : wtx.vin)
275  if (wallet->IsMine(txin))
276  strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -wallet->GetDebit(txin, ISMINE_ALL)) + "<br>";
277  for (const CTxOut& txout : wtx.vout)
278  if (wallet->IsMine(txout))
279  strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, wallet->GetCredit(wtx, txout, ISMINE_ALL)) + "<br>";
280 
281  strHTML += "<br><b>" + tr("Transaction") + ":</b><br>";
282  strHTML += GUIUtil::HtmlEscape(wtx.ToString(), true);
283 
284  strHTML += "<br><b>" + tr("Inputs") + ":</b>";
285  strHTML += "<ul>";
286 
287  for (const CTxIn& txin : wtx.vin) {
288  COutPoint prevout = wallet->findMyOutPoint(txin);
289 
290  CCoins prev;
291  if (pcoinsTip->GetCoins(prevout.hash, prev)) {
292  if (prevout.n < prev.vout.size()) {
293  strHTML += "<li>";
294  const CTxOut& vout = prev.vout[prevout.n];
295  CTxDestination address;
296  if (ExtractDestination(vout.scriptPubKey, address)) {
297  if (wallet->mapAddressBook.count(address) && !wallet->mapAddressBook[address].name.empty())
298  strHTML += GUIUtil::HtmlEscape(wallet->mapAddressBook[address].name) + " ";
299  strHTML += QString::fromStdString(CBitcoinAddress(address).ToString());
300  }
301  strHTML = strHTML + " " + tr("Amount") + "=" + BitcoinUnits::formatHtmlWithUnit(unit, wallet->getCTxOutValue(wtx, vout));
302  strHTML = strHTML + " IsMine=" + (wallet->IsMine(vout) & ISMINE_SPENDABLE ? tr("true") : tr("false"));
303  strHTML = strHTML + " IsWatchOnly=" + (wallet->IsMine(vout) & ISMINE_WATCH_ONLY ? tr("true") : tr("false")) + "</li>";
304  }
305  }
306  }
307 
308  strHTML += "</ul>";
309  }
310 
311  strHTML += "</font></html>";
312  return strHTML;
313 }
CTxIn
An input of a transaction.
Definition: transaction.h:83
LOCK2
#define LOCK2(cs1, cs2)
Definition: sync.h:183
IsMine
isminetype IsMine(const CKeyStore &keystore, const CTxDestination &dest)
Definition: wallet_ismine.cpp:30
CWallet::IsMine
isminetype IsMine(const CTxIn &txin) const
Definition: wallet.cpp:1333
transactiondesc.h
chainActive
CChain chainActive
The currently-connected chain of blocks.
Definition: main.cpp:70
timedata.h
COutPoint::hash
uint256 hash
Definition: transaction.h:39
CWalletTx::mapValue
mapValue_t mapValue
Definition: wallet.h:798
CBitcoinAddress
base58-encoded PRCY addresses.
Definition: base58.h:109
CTransaction::nLockTime
const uint32_t nLockTime
Definition: transaction.h:287
wallet.h
g_logger
BCLog::Logger *const g_logger
NOTE: the logger instances is leaked on exit.
Definition: logging.cpp:28
isminetype
isminetype
IsMine() return codes.
Definition: wallet_ismine.h:16
CTransaction::GetValueOut
CAmount GetValueOut() const
Definition: transaction.cpp:155
guiinterface.h
IsFinalTx
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.
Definition: tx_verify.cpp:12
db.h
TransactionRecord
UI model for a transaction.
Definition: transactionrecord.h:72
SWIFTTX_SIGNATURES_TOTAL
#define SWIFTTX_SIGNATURES_TOTAL
Definition: swifttx.h:27
r
void const uint64_t uint64_t * r
Definition: field_5x52_asm_impl.h:10
cs_main
RecursiveMutex cs_main
Global state.
Definition: main.cpp:65
CTransaction::IsCoinBase
bool IsCoinBase() const
Definition: transaction.h:359
CCoins::vout
std::vector< CTxOut > vout
unspent transaction outputs; spent outputs are .IsNull(); spent outputs at the end of the array are d...
Definition: coins.h:85
CWalletTx::nTimeReceived
unsigned int nTimeReceived
Definition: wallet.h:801
SWIFTTX_SIGNATURES_REQUIRED
#define SWIFTTX_SIGNATURES_REQUIRED
Definition: swifttx.h:26
CChainParams::COINBASE_MATURITY
int COINBASE_MATURITY() const
Definition: chainparams.h:85
CWalletTx::GetCredit
CAmount GetCredit(const isminefilter &filter) const
Definition: wallet.cpp:1505
CTxOut
An output of a transaction.
Definition: transaction.h:164
CTransaction::vout
std::vector< CTxOut > vout
Definition: transaction.h:286
CTxOut::scriptPubKey
CScript scriptPubKey
Definition: transaction.h:168
CWallet::GetCredit
CAmount GetCredit(const CTransaction &tx, const CTxOut &txout, const isminefilter &filter) const
Definition: wallet.cpp:6172
ISMINE_ALL
@ ISMINE_ALL
Definition: wallet_ismine.h:21
CWalletTx::GetDebit
CAmount GetDebit(const isminefilter &filter) const
Definition: wallet.cpp:1478
GetBoolArg
bool GetBoolArg(const std::string &strArg, bool fDefault)
Return boolean argument or default value.
Definition: util.cpp:255
PAIRTYPE
#define PAIRTYPE(t1, t2)
This is needed because the foreach macro can't get over the comma in pair<t1, t2>
Definition: utilstrencodings.h:24
CAmount
int64_t CAmount
Amount in PRCY (Can be negative)
Definition: amount.h:17
pcoinsTip
CCoinsViewCache * pcoinsTip
Global variable that points to the active CCoinsView (protected by cs_main)
Definition: main.cpp:1130
guiutil.h
ISMINE_SPENDABLE
@ ISMINE_SPENDABLE
Definition: wallet_ismine.h:20
AssertLockHeld
#define AssertLockHeld(cs)
Definition: sync.h:71
CWalletTx::vOrderForm
std::vector< std::pair< std::string, std::string > > vOrderForm
Definition: wallet.h:799
CWalletTx::GetTxTime
int64_t GetTxTime() const
Definition: wallet.cpp:1433
ExtractDestination
bool ExtractDestination(const CScript &scriptPubKey, CTxDestination &addressRet)
Definition: standard.cpp:199
ISMINE_WATCH_ONLY
@ ISMINE_WATCH_ONLY
Indicates that we dont know how to create a scriptSig that would solve this if we were given the appr...
Definition: wallet_ismine.h:19
CWallet::GetDebit
CAmount GetDebit(const CTxIn &txin, const isminefilter &filter) const
Definition: wallet.cpp:1402
CTxDestination
boost::variant< CNoDestination, CKeyID, CScriptID > CTxDestination
A txout script template with a specific destination.
Definition: standard.h:81
CMerkleTx::GetDepthInMainChain
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...
Definition: wallet.cpp:6006
CChain::Height
int Height() const
Return the maximal height in the chain.
Definition: chain.h:641
transactionrecord.h
TransactionRecord::address
std::string address
Definition: transactionrecord.h:113
GetAdjustedTime
int64_t GetAdjustedTime()
Definition: timedata.cpp:30
BCLog::Logger::DefaultShrinkDebugFile
bool DefaultShrinkDebugFile() const
Definition: logging.cpp:89
CTransaction::ToString
std::string ToString() const
Definition: transaction.cpp:217
GUIUtil::HtmlEscape
QString HtmlEscape(const QString &str, bool fMultiLine)
Definition: guiutil.cpp:200
CMerkleTx::GetBlocksToMaturity
int GetBlocksToMaturity() const
Definition: wallet.cpp:6025
CWalletTx::GetChange
CAmount GetChange() const
Definition: wallet.cpp:6346
main.h
COutPoint::n
uint32_t n
Definition: transaction.h:40
CTransaction::vin
std::vector< CTxIn > vin
Definition: transaction.h:285
CWallet
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,...
Definition: wallet.h:243
CWalletTx
A transaction with a bunch of additional info that only the owner cares about.
Definition: wallet.h:792
TransactionRecord::getOutputIndex
int getOutputIndex() const
Return the output index of the subtransaction
Definition: transactionrecord.cpp:262
CMerkleTx::GetTransactionLockSignatures
int GetTransactionLockSignatures() const
Definition: wallet.cpp:6054
Params
const CChainParams & Params()
Return the currently selected parameters.
Definition: chainparams.cpp:463
CMerkleTx::IsInMainChain
bool IsInMainChain() const
Definition: wallet.cpp:6033
TransactionDesc::FormatTxStatus
static QString FormatTxStatus(const CWalletTx &wtx)
Definition: transactiondesc.cpp:28
CMerkleTx::IsTransactionLockTimedOut
bool IsTransactionLockTimedOut() const
Definition: wallet.cpp:6068
bitcoinunits.h
CWallet::cs_wallet
RecursiveMutex cs_wallet
Definition: wallet.h:301
CWallet::findMyOutPoint
COutPoint findMyOutPoint(const CTxIn &txin) const
Definition: wallet.cpp:1348
BitcoinUnits::formatHtmlWithUnit
static QString formatHtmlWithUnit(int unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=separatorStandard)
Definition: bitcoinunits.cpp:195
base58.h
CCoins
Definition: coins.h:77
script.h
GUIUtil::dateTimeStr
QString dateTimeStr(const QDateTime &date)
Definition: guiutil.cpp:70
COutPoint
An outpoint - a combination of a transaction hash and an index n into its vout.
Definition: transaction.h:36
TransactionDesc::toHTML
static QString toHTML(CWallet *wallet, CWalletTx &wtx, TransactionRecord *rec, int unit)
Definition: transactiondesc.cpp:87
CWalletTx::GetRequestCount
int GetRequestCount() const
Definition: wallet.cpp:1445
TransactionRecord::getTxID
QString getTxID() const
Return the unique identifier for this transaction (part)
Definition: transactionrecord.cpp:257
CBitcoinAddress::IsValid
bool IsValid() const
Definition: base58.cpp:254
CBitcoinAddress::Get
CTxDestination Get() const
Definition: base58.cpp:267
CCoinsViewCache::GetCoins
bool GetCoins(const uint256 &txid, CCoins &coins) const
Retrieve the CCoins (unspent transaction outputs) for a given txid.
Definition: coins.cpp:113
CWallet::getCTxOutValue
CAmount getCTxOutValue(const CTransaction &tx, const CTxOut &out) const
Definition: wallet.cpp:7202
CWallet::mapAddressBook
std::map< CTxDestination, CAddressBookData > mapAddressBook
Definition: wallet.h:354
paymentserver.h