PRCYCoin  2.0.0.7rc1
P2P Digital Currency
wallet.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2014 The Bitcoin developers
3 // Copyright (c) 2014-2015 The Dash developers
4 // Copyright (c) 2015-2018 The PIVX developers
5 // Copyright (c) 2018-2020 The DAPS Project developers
6 // Distributed under the MIT software license, see the accompanying
7 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
8 
9 #ifndef BITCOIN_WALLET_H
10 #define BITCOIN_WALLET_H
11 
12 #include "amount.h"
13 #include "base58.h"
14 #include "consensus/tx_verify.h"
15 #include "crypter.h"
16 #include "kernel.h"
17 #include "key.h"
18 #include "keystore.h"
19 #include "main.h"
20 #include "primitives/block.h"
21 #include "primitives/transaction.h"
22 #include "guiinterface.h"
23 #include "util.h"
24 #include "validationinterface.h"
25 #include "wallet/wallet_ismine.h"
26 #include "wallet/walletdb.h"
27 
28 #include <algorithm>
29 #include <atomic>
30 #include <map>
31 #include <memory>
32 #include <set>
33 #include <stdexcept>
34 #include <stdint.h>
35 #include <string>
36 #include <utility>
37 #include <vector>
38 
39 #include <boost/program_options/options_description.hpp>
40 #include <boost/program_options/variables_map.hpp>
41 #include <boost/serialization/list.hpp>
42 #include <boost/serialization/vector.hpp>
43 #include <boost/serialization/deque.hpp>
44 
45 extern CWallet* pwalletMain;
46 
50 extern CFeeRate payTxFee;
51 extern CAmount maxTxFee;
52 extern unsigned int nTxConfirmTarget;
53 extern bool bSpendZeroConfChange;
54 extern bool bdisableSystemnotifications;
55 extern bool fSendFreeTransactions;
56 extern bool fPayAtLeastCustomFee;
57 extern int64_t nReserveBalance;
58 extern bool fTxDeleteEnabled;
59 extern bool fTxConflictDeleteEnabled;
60 extern int fDeleteInterval;
61 extern unsigned int fDeleteTransactionsAfterNBlocks;
62 extern unsigned int fKeepLastNTransactions;
63 
65 static const CAmount DEFAULT_TRANSACTION_FEE = 0.1 * COIN;//
67 static const CAmount nHighTransactionFeeWarning = 0.1 * COIN;
69 static const CAmount DEFAULT_TRANSACTION_MAXFEE = 1 * COIN;
71 static const CAmount nHighTransactionMaxFeeWarning = 100 * nHighTransactionFeeWarning;
73 static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000;
75 static const int DEFAULT_CUSTOMBACKUPTHRESHOLD = 1;
76 
77 //Default Transaction Retention N-BLOCKS
78 static const int DEFAULT_TX_DELETE_INTERVAL = 10000;
79 
80 //Default Transaction Retention N-BLOCKS
81 static const unsigned int DEFAULT_TX_RETENTION_BLOCKS = 10000;
82 
83 //Default Retenion Last N-Transactions
84 static const unsigned int DEFAULT_TX_RETENTION_LASTTX = 200;
85 
86 //Amount of transactions to delete per run while syncing
87 static const int MAX_DELETE_TX_SIZE = 50000;
88 
89 // 6666 = 1*5000 + 1*1000 + 1*500 + 1*100 + 1*50 + 1*10 + 1*5 + 1
90 static const int ZQ_6666 = 6666;
91 
92 class CAccountingEntry;
93 class CCoinControl;
94 class COutput;
95 class CReserveKey;
96 class CScript;
97 class CWalletTx;
98 
101  FEATURE_BASE = 10500, // the earliest version new wallets supports (only useful for getinfo's clientversion output)
102 
103  FEATURE_WALLETCRYPT = 40000, // wallet encryption
104  FEATURE_COMPRPUBKEY = 60000, // compressed public keys
105 
107 };
108 
111  ONLY_5000 = 5, // find masternode outputs including locked ones (use with caution)
112  STAKABLE_COINS = 6 // UTXO's that are valid for staking
113 };
114 
118  std::vector<CTxIn> vecTxIn;
120  {
121  nAmount = 0;
122  }
123 };
124 
126 class CKeyPool
127 {
128 public:
129  int64_t nTime;
131 
132  CKeyPool();
133  CKeyPool(const CPubKey& vchPubKeyIn);
134 
136 
137  template <typename Stream, typename Operation>
138  inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
139  {
140  if (!(nType & SER_GETHASH))
141  READWRITE(nVersion);
142  READWRITE(nTime);
144  }
145 };
146 
149 {
150 public:
151  std::string name;
152  std::string purpose;
153 
155  {
156  purpose = "unknown";
157  }
158 
159  typedef std::map<std::string, std::string> StringMap;
161 };
162 
167 class CAccount
168 {
169 public:
171  uint32_t nAccountIndex;
172 
174  {
175  SetNull();
176  }
177 
178  void SetNull()
179  {
180  vchPubKey = CPubKey();
181  }
182 
184 
185  template <typename Stream, typename Operation>
186  inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
187  {
188  if (!(nType & SER_GETHASH))
189  READWRITE(nVersion);
192  }
193 };
194 
196 {
197 public:
200 
202  {
203  SetNull();
204  }
205 
206  void SetNull()
207  {
210  }
211 
213 
214  template <typename Stream, typename Operation>
215  inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
216  {
219  }
220 };
221 
222 //in any case consolidation needed, call estimateConsolidationFees function to estimate fees
224 {
225  STAKING_OK, //use case B, C, D, no consolidation needed,
226  UNSTAKABLE_BALANCE_TOO_LOW, //coin is not mature yet (balance > 2.5k)
227  UNSTAKABLE_BALANCE_TOO_LOW_CONSOLIDATION_FAILED, //coin is not mature yet (balance > 2.5k)
230  STAKABLE_NEED_CONSOLIDATION, //stable and consolidation, needs to estimate fees
231  STAKABLE_NEED_CONSOLIDATION_WITH_RESERVE_BALANCE //stable and consolidation, needs to estimate fees
232 };
233 
236  ON,
237 };
238 
244 {
245 private:
246  bool SelectCoins(bool needFee, CAmount& estimatedFee, int ringSize, int numOut, const CAmount& nTargetValue, std::set<std::pair<const CWalletTx*, unsigned int> >& setCoinsRet, CAmount& nValueRet, const CCoinControl* coinControl = NULL, AvailableCoinsType coin_type = ALL_COINS, bool useIX = true) ;
247  //it was public bool SelectCoins(int64_t nTargetValue, std::set<std::pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64_t& nValueRet, const CCoinControl *coinControl = NULL, AvailableCoinsType coin_type=ALL_COINS, bool useIX = true) const;
248 
252 
255 
258 
259  int64_t nNextResend;
260  int64_t nLastResend;
261 
267  typedef std::multimap<COutPoint, uint256> TxSpends;
269  void AddToSpends(const COutPoint& outpoint, const uint256& wtxid);
270  void AddToSpends(const uint256& wtxid);
271  void RemoveFromSpends(const uint256& wtxid);
272 
273  void SyncMetaData(std::pair<TxSpends::iterator, TxSpends::iterator>);
274 
275 public:
276  static const int32_t MAX_DECOY_POOL = 500;
277  static const int32_t PROBABILITY_NEW_COIN_SELECTED = 70;
278  bool RescanAfterUnlock(int fromHeight);
279  bool MintableCoins();
281  bool SelectStakeCoins(std::list<std::unique_ptr<CStakeInput> >& listInputs, CAmount nTargetAmount);
282  bool IsMasternodeController();
283  bool checkPassPhraseRule(const char *pass);
284  COutPoint findMyOutPoint(const CTxIn& txin) const;
285  static int ComputeTxSize(size_t numIn, size_t numOut, size_t ringSize);
286  void resetPendingOutPoints();
288  static int MaxTxSizePerTx();
289  std::string GetTransactionType(const CTransaction& tx);
290  bool WriteAutoConsolidateSettingTime(uint32_t settingTime);
292  bool IsAutoConsolidateOn();
293  std::string GetUniqueWalletBackupName() const;
294  /*
295  * Main wallet lock.
296  * This lock protects all the fields added by CWallet
297  * except for:
298  * fFileBacked (immutable after instantiation)
299  * strWalletFile (immutable after instantiation)
300  */
302 
305  std::string strWalletFile;
306 
307  std::set<int64_t> setKeyPool;
308  std::map<CKeyID, CKeyMetadata> mapKeyMetadata;
309 
310  typedef std::map<unsigned int, CMasterKey> MasterKeyMap;
312  unsigned int nMasterKeyMaxID;
313 
314  // Stake Settings
315  unsigned int nHashDrift;
316  unsigned int nHashInterval;
320 
321  //MultiSend
322  std::vector<std::pair<std::string, int> > vMultiSend;
328  std::vector<std::string> vDisabledAddresses;
329 
330  //Auto Combine Inputs
334  bool CreateSweepingTransaction(CAmount target, CAmount threshold, uint32_t nTimeBefore);
335  bool SendAll(std::string des, CWalletTx& wtxNew, bool inclLocked);
336 
337  CWallet();
338  CWallet(std::string strWalletFileIn);
339  ~CWallet();
340  void SetNull();
341  bool isMultiSendEnabled();
342  void setMultiSendDisabled();
343 
344  mutable std::map<uint256, CWalletTx> mapWallet;
345  std::list<CAccountingEntry> laccentries;
346 
347  typedef std::pair<CWalletTx*, CAccountingEntry*> TxPair;
348  typedef std::multimap<int64_t, TxPair > TxItems;
350 
351  int64_t nOrderPosNext;
352  std::map<uint256, int> mapRequestCount;
353 
354  std::map<CTxDestination, CAddressBookData> mapAddressBook;
355  std::map<std::string, std::string> addrToTxHashMap;
356  std::vector<CKey> txPrivKeys; //only for temporary storing tx private keys for user transactions, dont care staking transactions
357 
359 
360  std::set<COutPoint> setLockedCoins;
361  std::map<CKeyID, CHDPubKey> mapHdPubKeys; //<! memory map of HD extended pubkeys
362 
363  int64_t nTimeFirstKey;
364 
367 
368  mutable std::map<std::string, CKeyImage> outpointToKeyImages;
369  std::map<std::string, bool> keyImagesSpends;
370  std::map<std::string, std::string> keyImageMap;//mapping from: txhashHex-n to key image str, n = index
371  std::list<std::string> pendingKeyImages;
372  std::map<COutPoint, bool> inSpendQueueOutpoints;
373  std::vector<COutPoint> inSpendQueueOutpointsPerSession;
374  mutable std::map<CScript, CAmount> amountMap;
375  mutable std::map<CScript, CKey> blindMap;
376  mutable std::map<COutPoint, uint256> userDecoysPool; //used in transaction spending user transaction
377  mutable std::map<COutPoint, uint256> coinbaseDecoysPool; //used in transction spending coinbase
378 
380 
381  const CWalletTx* GetWalletTx(const uint256& hash) const;
382 
383  std::vector<CWalletTx> getWalletTxs();
384 
386  bool CanSupportFeature(enum WalletFeature wf);
387 
388  bool generateKeyImage(const CPubKey& pub, CKeyImage& img) const;
389  bool generateKeyImage(const CScript& scriptKey, CKeyImage& img) const;
390 
391  bool AvailableCoins(std::vector<COutput>& vCoins, bool fOnlyConfirmed = true, const CCoinControl* coinControl = NULL, bool fIncludeZeroValue = false, AvailableCoinsType nCoinType = ALL_COINS, bool fUseIX = false);
392  std::map<CBitcoinAddress, std::vector<COutput> > AvailableCoinsByAddress(bool fConfirmed = true, CAmount maxCoinValue = 0);
393  bool SelectCoinsMinConf(bool needFee, CAmount& estimatedFee, int ringSize, int numOut, const CAmount& nTargetValue, int nConfMine, int nConfTheirs, std::vector<COutput> vCoins, std::set<std::pair<const CWalletTx*, unsigned int> >& setCoinsRet, CAmount& nValueRet);
394 
396  bool GetMasternodeVinAndKeys(CTxIn& txinRet, CPubKey& pubKeyRet,
397  CKey& keyRet, std::string strTxHash, std::string strOutputIndex, std::string& strError);
399  bool GetVinAndKeysFromOutput(COutput out, CTxIn& txinRet, CPubKey& pubKeyRet, CKey& keyRet);
400 
401  bool IsSpent(const uint256& hash, unsigned int n);
402  unsigned int GetSpendDepth(const uint256& hash, unsigned int n) const;
403 
404  bool IsLockedCoin(uint256 hash, unsigned int n) const;
405  void LockCoin(COutPoint& output);
406  void UnlockCoin(COutPoint& output);
407  void UnlockAllCoins();
408  void ListLockedCoins(std::vector<COutPoint>& vOutpts);
409 
410  // keystore implementation
411  // Generate a new key
413  void DeriveNewChildKey(uint32_t nAccountIndex, CKey& secretRet);
414  void GenerateNewHDChain(std::string* phrase = NULL);
415  /* Set the HD chain model (chain child index counters) */
416  bool SetHDChain(const CHDChain& chain, bool memonly);
417  bool SetCryptedHDChain(const CHDChain& chain, bool memonly);
418  bool GetDecryptedHDChain(CHDChain& hdChainRet);
419  bool IsHDEnabled();
420  bool GetSeedPhrase(std::string &phrase);
421  bool HaveKey(const CKeyID &address) const;
423  bool GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const;
425  bool GetKey(const CKeyID &address, CKey& keyOut) const;
427  bool AddHDPubKey(const CExtPubKey &extPubKey, bool fInternal, uint32_t nAccountIndex);
429  bool LoadHDPubKey(const CHDPubKey &hdPubKey);
431  bool AddKeyPubKey(const CKey& key, const CPubKey& pubkey);
433  bool LoadKey(const CKey& key, const CPubKey& pubkey) { return CCryptoKeyStore::AddKeyPubKey(key, pubkey); }
435  bool LoadKeyMetadata(const CPubKey& pubkey, const CKeyMetadata& metadata);
436 
437  bool LoadMinVersion(int nVersion);
438 
440  bool AddCryptedKey(const CPubKey& vchPubKey, const std::vector<unsigned char>& vchCryptedSecret);
442  bool LoadCryptedKey(const CPubKey& vchPubKey, const std::vector<unsigned char>& vchCryptedSecret);
443  bool AddCScript(const CScript& redeemScript);
444  bool LoadCScript(const CScript& redeemScript);
445 
447  bool AddDestData(const CTxDestination& dest, const std::string& key, const std::string& value);
449  bool EraseDestData(const CTxDestination& dest, const std::string& key);
451  bool LoadDestData(const CTxDestination& dest, const std::string& key, const std::string& value);
452 
454  bool AddWatchOnly(const CScript& dest);
455  bool RemoveWatchOnly(const CScript& dest);
457  bool LoadWatchOnly(const CScript& dest);
458 
460  bool Lock();
461  bool Unlock(const SecureString& strWalletPassphrase, bool anonimizeOnly = false);
462  bool Unlock(const CKeyingMaterial& vMasterKeyIn);
463  bool ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, const SecureString& strNewWalletPassphrase);
464  bool EncryptWallet(const SecureString& strWalletPassphrase);
465 
466  void GetKeyBirthTimes(std::map<CKeyID, int64_t>& mapKeyBirth) const;
467  unsigned int ComputeTimeSmart(const CWalletTx& wtx) const;
468 
473  int64_t IncOrderPosNext(CWalletDB* pwalletdb = NULL);
474 
475 
476  void MarkDirty();
477  bool AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet, CWalletDB* pwalletdb);
478  void SyncTransaction(const CTransaction& tx, const CBlock* pblock);
479  bool AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate);
480  bool EraseFromWallet(const uint256& hash);
481  void ReorderWalletTransactions(std::map<std::pair<int,int>, CWalletTx*> &mapSorted, int64_t &maxOrderPos);
482  void UpdateWalletTransactionOrder(std::map<std::pair<int,int>, CWalletTx*> &mapSorted, bool resetOrder);
483  bool DeleteTransactions(std::vector<uint256> &removeTxs, bool fRescan = false);
484  bool DeleteWalletTransactions(const CBlockIndex* pindex, bool fRescan = false);
485  int ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate = false, bool fromStartup = false, int height = -1);
490  CAmount GetLockedCoins() const;
491  CAmount GetUnlockedCoins() const;
493  CAmount GetImmatureBalance() const;
497  bool CreateTransaction(CScript scriptPubKey, int64_t nValue, CWalletTx& wtxNew, CReserveKey& reservekey, int64_t& nFeeRet, std::string& strFailReason, const CCoinControl* coinControl);
498  bool CreateTransaction(const std::vector<std::pair<CScript, CAmount> >& vecSend,
499  CWalletTx& wtxNew,
500  CReserveKey& reservekey,
501  CAmount& nFeeRet,
502  std::string& strFailReason,
503  const CCoinControl* coinControl = NULL,
504  AvailableCoinsType coin_type = ALL_COINS,
505  bool useIX = false,
506  CAmount nFeePay = 0);
507  bool CreateTransactionBulletProof(const CKey& txPrivDes,
508  const CPubKey& recipientViewKey,
509  const std::vector<std::pair<CScript, CAmount> >& vecSend,
510  CWalletTx& wtxNew,
511  CReserveKey& reservekey,
512  CAmount& nFeeRet,
513  std::string& strFailReason,
514  const CCoinControl* coinControl = NULL,
515  AvailableCoinsType coin_type = ALL_COINS,
516  bool useIX = false,
517  CAmount nFeePay = 0, int ringSize = 6, bool tomyself = false);
518 
519  bool CreateTransactionBulletProof(const CKey& txPrivDes, const CPubKey &recipientViewKey, CScript scriptPubKey, const CAmount &nValue,
520  CWalletTx &wtxNew, CReserveKey &reservekey, CAmount &nFeeRet,
521  std::string &strFailReason, const CCoinControl *coinControl = NULL,
522  AvailableCoinsType coin_type = ALL_COINS, bool useIX = false,
523  CAmount nFeePay = 0, int ringSize = 6, bool tomyself = false);
524 
525  int ComputeFee(size_t numIn, size_t numOut, size_t ringSize);
527  bool CreateTransaction(CScript scriptPubKey, const CAmount &nValue, CWalletTx &wtxNew, CReserveKey &reservekey,
528  CAmount &nFeeRet, std::string &strFailReason, const CCoinControl *coinControl = NULL,
529  AvailableCoinsType coin_type = ALL_COINS, bool useIX = false, CAmount nFeePay = 0);
530  bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, std::string strCommand = NetMsgType::TX);
531  bool AddAccountingEntry(const CAccountingEntry&, CWalletDB & pwalletdb);
532  bool CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int64_t nSearchInterval, CMutableTransaction& txNew, unsigned int& nTxNewTime);
533  bool MultiSend();
534  void AutoCombineDust();
535 
537  static CAmount GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool);
538 
539  bool NewKeyPool();
540  bool TopUpKeyPool(unsigned int kpSize = 0);
541  void ReserveKeyFromKeyPool(int64_t& nIndex, CKeyPool& keypool);
542  void KeepKey(int64_t nIndex);
543  void ReturnKey(int64_t nIndex);
544  bool GetKeyFromPool(CPubKey& key);
545  int64_t GetOldestKeyPoolTime();
546  void GetAllReserveKeys(std::set<CKeyID>& setAddress) const;
547 
548  std::set<std::set<CTxDestination> > GetAddressGroupings();
549  std::map<CTxDestination, CAmount> GetAddressBalances();
550 
551  std::set<CTxDestination> GetAccountAddresses(std::string strAccount) const;
552 
553  bool GetBudgetSystemCollateralTX(CTransaction& tx, uint256 hash, bool useIX);
554  bool GetBudgetSystemCollateralTX(CWalletTx& tx, uint256 hash, bool useIX);
555 
556  isminetype IsMine(const CTxIn& txin) const;
557  CAmount GetDebit(const CTxIn& txin, const isminefilter& filter) const;
558  isminetype IsMine(const CTxOut& txout) const;
559  CAmount GetCredit(const CTransaction& tx, const CTxOut& txout, const isminefilter& filter) const;
560  bool IsChange(const CTxOut& txout) const;
561  CAmount GetChange(const CTransaction& tx, const CTxOut& txout) const;
562  bool IsMine(const CTransaction& tx) const;
564  bool IsFromMe(const CTransaction& tx) const;
565  CAmount GetDebit(const CTransaction& tx, const isminefilter& filter) const;
566  CAmount GetCredit(const CTransaction& tx, const isminefilter& filter) const;
567  CAmount GetChange(const CTransaction& tx) const;
568  void SetBestChain(const CBlockLocator& loc);
569 
570  DBErrors LoadWallet(bool& fFirstRunRet);
571  DBErrors ZapWalletTx(std::vector<CWalletTx>& vWtx);
572 
573  bool SetAddressBook(const CTxDestination& address, const std::string& strName, const std::string& purpose);
574 
575  bool DelAddressBook(const CTxDestination& address);
576 
577  bool UpdatedTransaction(const uint256& hashTx);
578 
579  void Inventory(const uint256& hash);
580 
581  unsigned int GetKeyPoolSize();
582 
583  bool SetDefaultKey(const CPubKey& vchPubKey);
584 
586  bool SetMinVersion(enum WalletFeature, CWalletDB* pwalletdbIn = NULL, bool fExplicit = false);
587 
589  bool SetMaxVersion(int nVersion);
590 
592  int GetVersion();
593 
595  std::set<uint256> GetConflicts(const uint256& txid) const;
596 
601  boost::signals2::signal<void(CWallet* wallet, const CTxDestination& address, const std::string& label, bool isMine, const std::string& purpose, ChangeType status)> NotifyAddressBookChanged;
602 
607  boost::signals2::signal<void(CWallet* wallet, const uint256& hashTx, ChangeType status)> NotifyTransactionChanged;
608 
610  boost::signals2::signal<void(const std::string& title, int nProgress)> ShowProgress;
611 
613  boost::signals2::signal<void(bool fHaveWatchOnly)> NotifyWatchonlyChanged;
614 
616  boost::signals2::signal<void (const bool& fSuccess, const std::string& filename)> NotifyWalletBacked;
617 
618  bool ComputeStealthPublicAddress(const std::string& accountName, std::string& pubAddress);
619  bool ComputeIntegratedPublicAddress(const uint64_t paymentID, const std::string& accountName, std::string& pubAddress);
620  bool EncodeStealthPublicAddress(const std::vector<unsigned char>& pubViewKey, const std::vector<unsigned char>& pubSpendKey, std::string& pubAddr);
621  bool EncodeStealthPublicAddress(const CPubKey& pubViewKey, const CPubKey& pubSpendKey, std::string& pubAddr);
622  static bool DecodeStealthAddress(const std::string& stealth, CPubKey& pubViewKey, CPubKey& pubSpendKey, bool& hasPaymentID, uint64_t& paymentID);
623  static bool ComputeStealthDestination(const CKey& secret, const CPubKey& pubViewKey, const CPubKey& pubSpendKey, CPubKey& des);
624  bool SendToStealthAddress(const std::string& stealthAddr, CAmount nValue, CWalletTx& wtxNew, bool fUseIX = false, int ringSize = 5);
625  bool GenerateAddress(CPubKey& pub, CPubKey& txPub, CKey& txPriv) const;
626  bool IsTransactionForMe(const CTransaction& tx);
627  bool ReadAccountList(std::string& accountList);
628  bool ReadStealthAccount(const std::string& strAccount, CStealthAccount& account);
629  bool EncodeIntegratedAddress(const CPubKey& pubViewKey, const CPubKey& pubSpendKey, uint64_t paymentID, std::string& pubAddr);
630  bool EncodeIntegratedAddress(const std::vector<unsigned char>& pubViewKey, const std::vector<unsigned char>& pubSpendKey, uint64_t paymentID, std::string& pubAddrb58);
631  bool GenerateIntegratedAddress(const std::string& accountName, std::string& pubAddr);
632  std::string GenerateIntegratedAddressWithRandomPaymentID(std::string accountName, uint64_t& paymentID);
633  std::string GenerateIntegratedAddressWithProvidedPaymentID(std::string accountName, uint64_t paymentID);
634  bool GenerateIntegratedAddress(const CPubKey& pubViewKey, const CPubKey& pubSpendKey, std::string& pubAddr);
635  bool AllMyPublicAddresses(std::vector<std::string>& addresses, std::vector<std::string>& accountNames);
636  bool RevealTxOutAmount(const CTransaction &tx, const CTxOut &out, CAmount &amount, CKey&) const;
637  bool EncodeTxOutAmount(CTxOut& out, const CAmount& amount, const unsigned char * sharedSec, bool isCoinstake = false);
638  CAmount getCOutPutValue(const COutput& output) const;
639  CAmount getCTxOutValue(const CTransaction &tx, const CTxOut &out) const;
640  bool findCorrespondingPrivateKey(const CTxOut &txout, CKey &key) const;
641  void CreatePrivacyAccount(bool force = false);
642  bool mySpendPrivateKey(CKey& spend) const;
643  bool myViewPrivateKey(CKey& view) const;
644  static bool CreateCommitment(const CAmount val, CKey& blind, std::vector<unsigned char>& commitment);
645  static bool CreateCommitment(const unsigned char* blind, CAmount val, std::vector<unsigned char>& commitment);
646  static bool CreateCommitmentWithZeroBlind(const CAmount val, unsigned char* pBlind, std::vector<unsigned char>& commitment);
647  bool WriteStakingStatus(bool status);
648  bool ReadStakingStatus();
649  bool Write2FA(bool status);
650  bool Read2FA();
651  bool Write2FASecret(std::string secret);
652  std::string Read2FASecret();
653  bool Write2FAPeriod(int period);
654  int Read2FAPeriod();
655  bool Write2FALastTime(uint64_t lastTime);
656  uint64_t Read2FALastTime();
659  bool computeSharedSec(const CTransaction& tx, const CTxOut& out, CPubKey& sharedSec) const;
660  void AddComputedPrivateKey(const CTxOut& out);
661  bool IsCollateralized(const COutPoint& outpoint);
662 
663  /* Wallets parameter interaction */
664  static bool ParameterInteraction();
665 private:
666  bool encodeStealthBase58(const std::vector<unsigned char>& raw, std::string& stealth);
667  bool allMyPrivateKeys(std::vector<CKey>& spends, std::vector<CKey>& views);
668  void createMasterKey() const;
670  bool selectDecoysAndRealIndex(CTransaction& tx, int& myIndex, int ringSize);
671  bool makeRingCT(CTransaction& wtxNew, int ringSize, std::string& strFailReason);
672  int walletIdxCache = 0;
673  bool isMatchMyKeyImage(const CKeyImage& ki, const COutPoint& out);
674  void ScanWalletKeyImages();
675 };
676 
677 
680 {
681 protected:
683  int64_t nIndex;
685 
686 public:
687  CReserveKey(CWallet* pwalletIn)
688  {
689  nIndex = -1;
690  pwallet = pwalletIn;
691  }
692 
694  {
695  ReturnKey();
696  }
697 
698  void ReturnKey();
699  bool GetReservedKey(CPubKey& pubkey);
700  void KeepKey();
701 };
702 
703 
704 typedef std::map<std::string, std::string> mapValue_t;
705 
706 
707 static void ReadOrderPos(int64_t& nOrderPos, mapValue_t& mapValue)
708 {
709  if (!mapValue.count("n")) {
710  nOrderPos = -1; // TODO: calculate elsewhere
711  return;
712  }
713  nOrderPos = atoi64(mapValue["n"].c_str());
714 }
715 
716 
717 static void WriteOrderPos(const int64_t& nOrderPos, mapValue_t& mapValue)
718 {
719  if (nOrderPos == -1)
720  return;
721  mapValue["n"] = i64tostr(nOrderPos);
722 }
723 
724 struct COutputEntry {
727  int vout;
728 };
729 
731 class CMerkleTx : public CTransaction
732 {
733 private:
734  int GetDepthInMainChainINTERNAL(const CBlockIndex*& pindexRet) const;
735 
736 public:
738  int nIndex;
739 
741  {
742  Init();
743  }
744 
745  CMerkleTx(const CTransaction& txIn) : CTransaction(txIn)
746  {
747  Init();
748  }
749 
750  void Init()
751  {
753  nIndex = -1;
754  }
755 
757 
758  template <typename Stream, typename Operation>
759  inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
760  {
761  std::vector<uint256> vMerkleBranch; // For compatibility with older versions.
762  READWRITE(*(CTransaction*)this);
763  nVersion = this->nVersion;
764  READWRITE(hashBlock);
765  READWRITE(vMerkleBranch);
766  READWRITE(nIndex);
767  }
768 
769  int SetMerkleBranch(const CBlock& block);
770 
771 
778  int GetDepthInMainChain(const CBlockIndex*& pindexRet, bool enableIX = true) const;
779  int GetDepthInMainChain(bool enableIX = true) const;
780  bool IsInMainChain() const;
781  bool IsInMainChainImmature() const;
782  int GetBlocksToMaturity() const;
783  bool AcceptToMemoryPool(bool fLimitFree = true, bool fRejectInsaneFee = true, bool ignoreFees = false);
784  int GetTransactionLockSignatures() const;
785  bool IsTransactionLockTimedOut() const;
786 };
787 
792 class CWalletTx : public CMerkleTx
793 {
794 private:
796 
797 public:
799  std::vector<std::pair<std::string, std::string> > vOrderForm;
800  unsigned int fTimeReceivedIsTxTime;
801  unsigned int nTimeReceived;
802  unsigned int nTimeSmart;
803  char fFromMe;
804  std::string strFromAccount;
805  int64_t nOrderPos;
806  char fSpent = false;
807 
808  // memory only
809  mutable bool fDebitCached;
810  mutable bool fCreditCached;
811  mutable bool fImmatureCreditCached;
813  mutable bool fWatchDebitCached;
814  mutable bool fWatchCreditCached;
817  mutable bool fChangeCached;
818 
828 
829 
830  CWalletTx();
831  CWalletTx(CWallet* pwalletIn);
832  CWalletTx(CWallet* pwalletIn, const CMerkleTx& txIn);
833  CWalletTx(CWallet* pwalletIn, const CTransaction& txIn);
834  void Init(CWallet* pwalletIn);
835 
837 
838  template <typename Stream, typename Operation>
839  inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
840  {
841  if (ser_action.ForRead())
842  Init(NULL);
843  if (!ser_action.ForRead()) {
844  mapValue["fromaccount"] = strFromAccount;
845 
846  WriteOrderPos(nOrderPos, mapValue);
847 
848  if (nTimeSmart)
849  mapValue["timesmart"] = strprintf("%u", nTimeSmart);
850  }
851 
852  READWRITE(*(CMerkleTx*)this);
853  std::vector<CMerkleTx> vUnused;
854  READWRITE(vUnused);
860  READWRITE(fSpent);
861 
862  if (ser_action.ForRead()) {
863  strFromAccount = mapValue["fromaccount"];
864 
865  ReadOrderPos(nOrderPos, mapValue);
866 
867  nTimeSmart = mapValue.count("timesmart") ? (unsigned int)atoi64(mapValue["timesmart"]) : 0;
868  }
869 
870  mapValue.erase("fromaccount");
871  mapValue.erase("version");
872  mapValue.erase("spent");
873  mapValue.erase("n");
874  mapValue.erase("timesmart");
875  }
876 
878  void MarkDirty();
879 
880  void BindWallet(CWallet* pwalletIn);
881 
883  CAmount GetUnlockedCredit() const;
884  CAmount GetDebit(const isminefilter& filter) const;
885  CAmount GetCredit(const isminefilter& filter) const;
886  CAmount GetImmatureCredit(bool fUseCache = true) const;
887  CAmount GetAvailableCredit(bool fUseCache = true) const;
888  // Return sum of unlocked coins
889  CAmount GetLockedCredit() const;
890  CAmount GetImmatureWatchOnlyCredit(const bool& fUseCache = true) const;
891  CAmount GetAvailableWatchOnlyCredit(const bool& fUseCache = true) const;
892 
893  CAmount GetChange() const;
894 
895  void GetAmounts(std::list<COutputEntry>& listReceived,
896  std::list<COutputEntry>& listSent,
897  CAmount& nFee,
898  std::string& strSentAccount,
899  const isminefilter& filter) const;
900 
901  void GetAccountAmounts(const std::string& strAccount, CAmount& nReceived, CAmount& nSent, CAmount& nFee, const isminefilter& filter) const;
902 
903  bool IsFromMe(const isminefilter& filter) const;
904 
905  bool InMempool() const;
906 
907  bool IsTrusted() const;
908 
909  int GetBlockHeight() const;
910 
911  bool WriteToDisk(CWalletDB *pwalletdb);
912 
913  int64_t GetTxTime() const;
914  int64_t GetComputedTxTime() const;
915  int GetRequestCount() const;
916  void RelayWalletTransaction(std::string strCommand = NetMsgType::TX);
917 
918  std::set<uint256> GetConflicts() const;
919 };
920 
921 
922 class COutput
923 {
924 public:
925  const CWalletTx* tx;
926  int i;
927  int nDepth;
929 
930  COutput(const CWalletTx* txIn, int iIn, int nDepthIn, bool fSpendableIn)
931  {
932  tx = txIn;
933  i = iIn;
934  nDepth = nDepthIn;
935  fSpendable = fSpendableIn;
936  }
937 
938  CAmount Value() const
939  {
940  return tx->vout[i].nValue;
941  }
942 
943  std::string ToString() const;
944 };
945 
946 
949 {
950 public:
952  int64_t nTimeCreated;
953  int64_t nTimeExpires;
954  std::string strComment;
957 
958  CWalletKey(int64_t nExpires = 0);
959 
961 
962  template <typename Stream, typename Operation>
963  inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
964  {
965  if (!(nType & SER_GETHASH))
966  READWRITE(nVersion);
971  }
972 };
973 
974 
975 
976 
977 
983 {
984 public:
985  std::string strAccount;
987  int64_t nTime;
988  std::string strOtherAccount;
989  std::string strComment;
991  int64_t nOrderPos;
992  uint64_t nEntryNo;
993 
995  {
996  SetNull();
997  }
998 
999  void SetNull()
1000  {
1001  nCreditDebit = 0;
1002  nTime = 0;
1003  strAccount.clear();
1004  strOtherAccount.clear();
1005  strComment.clear();
1006  nOrderPos = -1;
1007  nEntryNo = 0;
1008  }
1009 
1011 
1012  template <typename Stream, typename Operation>
1013  inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
1014  {
1015  if (!(nType & SER_GETHASH))
1016  READWRITE(nVersion);
1019  READWRITE(nTime);
1021 
1022  if (!ser_action.ForRead()) {
1023  WriteOrderPos(nOrderPos, mapValue);
1024 
1025  if (!(mapValue.empty() && _ssExtra.empty())) {
1026  CDataStream ss(nType, nVersion);
1027  ss.insert(ss.begin(), '\0');
1028  ss << mapValue;
1029  ss.insert(ss.end(), _ssExtra.begin(), _ssExtra.end());
1030  strComment.append(ss.str());
1031  }
1032  }
1033 
1035 
1036  size_t nSepPos = strComment.find("\0", 0, 1);
1037  if (ser_action.ForRead()) {
1038  mapValue.clear();
1039  if (std::string::npos != nSepPos) {
1040  CDataStream ss(std::vector<char>(strComment.begin() + nSepPos + 1, strComment.end()), nType, nVersion);
1041  ss >> mapValue;
1042  _ssExtra = std::vector<char>(ss.begin(), ss.end());
1043  }
1044  ReadOrderPos(nOrderPos, mapValue);
1045  }
1046  if (std::string::npos != nSepPos)
1047  strComment.erase(nSepPos);
1048 
1049  mapValue.erase("n");
1050  }
1051 
1052 private:
1053  std::vector<char> _ssExtra;
1054 };
1055 
1056 
1057 
1058 #endif // BITCOIN_WALLET_H
CWallet::GetUnlockedCoins
CAmount GetUnlockedCoins() const
Definition: wallet.cpp:2282
kernel.h
CValidationInterface
Definition: validationinterface.h:32
CWallet::LockCoin
void LockCoin(COutPoint &output)
Definition: wallet.cpp:5057
CTxIn
An input of a transaction.
Definition: transaction.h:83
CKeyStore
A virtual base class for key stores.
Definition: keystore.h:21
maxTxFee
CAmount maxTxFee
Definition: wallet.cpp:52
block.h
CWallet::checkPassPhraseRule
bool checkPassPhraseRule(const char *pass)
Definition: wallet.cpp:187
CWallet::txPrivKeys
std::vector< CKey > txPrivKeys
Definition: wallet.h:356
CWallet::AddToWalletIfInvolvingMe
bool AddToWalletIfInvolvingMe(const CTransaction &tx, const CBlock *pblock, bool fUpdate)
Add a transaction to the wallet, or update it.
Definition: wallet.cpp:1272
CWallet::ComputeTimeSmart
unsigned int ComputeTimeSmart(const CWalletTx &wtx) const
Definition: wallet.cpp:5184
crypter.h
isminefilter
uint8_t isminefilter
used for bitflags of isminetype
Definition: wallet_ismine.h:24
UINT256_ZERO
const uint256 UINT256_ZERO
constant uint256 instances
Definition: uint256.h:129
CWallet::pendingKeyImages
std::list< std::string > pendingKeyImages
Definition: wallet.h:371
CAccountingEntry::CAccountingEntry
CAccountingEntry()
Definition: wallet.h:994
CAccountingEntry
Internal transfers.
Definition: wallet.h:982
CWallet::GetVinAndKeysFromOutput
bool GetVinAndKeysFromOutput(COutput out, CTxIn &txinRet, CPubKey &pubKeyRet, CKey &keyRet)
Extract txin information and keys from output.
Definition: wallet.cpp:970
UNSTAKABLE_BALANCE_TOO_LOW
@ UNSTAKABLE_BALANCE_TOO_LOW
Definition: wallet.h:226
CWallet::nMasterKeyMaxID
unsigned int nMasterKeyMaxID
Definition: wallet.h:312
CWallet::NotifyAddressBookChanged
boost::signals2::signal< void(CWallet *wallet, const CTxDestination &address, const std::string &label, bool isMine, const std::string &purpose, ChangeType status)> NotifyAddressBookChanged
Address book entry changed.
Definition: wallet.h:601
CWallet::IncOrderPosNext
int64_t IncOrderPosNext(CWalletDB *pwalletdb=NULL)
Increment the next transaction order id.
Definition: wallet.cpp:1150
CWallet::minTxFee
static CFeeRate minTxFee
Fees smaller than this (in duffs) are considered zero fee (for transaction creation) We are ~100 time...
Definition: wallet.h:536
CWallet::nWalletMaxVersion
int nWalletMaxVersion
the maximum wallet format version: memory-only variable that specifies to what version this wallet ma...
Definition: wallet.h:257
CAccount::SetNull
void SetNull()
Definition: wallet.h:178
CMerkleTx::ADD_SERIALIZE_METHODS
ADD_SERIALIZE_METHODS
Definition: wallet.h:756
CWallet::GenerateAddress
bool GenerateAddress(CPubKey &pub, CPubKey &txPub, CKey &txPriv) const
Definition: wallet.cpp:6623
CWallet::EncodeStealthPublicAddress
bool EncodeStealthPublicAddress(const std::vector< unsigned char > &pubViewKey, const std::vector< unsigned char > &pubSpendKey, std::string &pubAddr)
Definition: wallet.cpp:6437
CWallet::GetAddressGroupings
std::set< std::set< CTxDestination > > GetAddressGroupings()
Definition: wallet.cpp:4896
CWallet::SelectCoinsMinConf
bool SelectCoinsMinConf(bool needFee, CAmount &estimatedFee, int ringSize, int numOut, const CAmount &nTargetValue, int nConfMine, int nConfTheirs, std::vector< COutput > vCoins, std::set< std::pair< const CWalletTx *, unsigned int > > &setCoinsRet, CAmount &nValueRet)
Definition: wallet.cpp:2861
CWallet::MintableCoins
bool MintableCoins()
Definition: wallet.cpp:2674
CWallet::estimateStakingConsolidationFees
bool estimateStakingConsolidationFees(CAmount &min, CAmount &max)
Definition: wallet.cpp:5755
FEATURE_COMPRPUBKEY
@ FEATURE_COMPRPUBKEY
Definition: wallet.h:104
CWallet::mapTxSpends
TxSpends mapTxSpends
Definition: wallet.h:268
CReserveKey::pwallet
CWallet * pwallet
Definition: wallet.h:682
CWallet::fWalletUnlockStakingOnly
bool fWalletUnlockStakingOnly
Definition: wallet.h:304
CWallet::MakeShnorrSignature
bool MakeShnorrSignature(CTransaction &)
Definition: wallet.cpp:3993
CWallet::ResendWalletTransactions
void ResendWalletTransactions()
Definition: wallet.cpp:2199
CWallet::ComputeReserveUTXOAmount
CAmount ComputeReserveUTXOAmount()
Definition: wallet.cpp:3133
CWallet::mapWallet
std::map< uint256, CWalletTx > mapWallet
Definition: wallet.h:344
CWallet::SendAll
bool SendAll(std::string des, CWalletTx &wtxNew, bool inclLocked)
Definition: wallet.cpp:5252
SER_GETHASH
@ SER_GETHASH
Definition: serialize.h:161
CWallet::addrToTxHashMap
std::map< std::string, std::string > addrToTxHashMap
Definition: wallet.h:355
CWalletKey
Private key that includes an expiration date in case it never gets used.
Definition: wallet.h:948
CWallet::MasterKeyMap
std::map< unsigned int, CMasterKey > MasterKeyMap
Definition: wallet.h:310
CWallet::fFileBacked
bool fFileBacked
Definition: wallet.h:303
CWallet::ReadStakingStatus
bool ReadStakingStatus()
Definition: wallet.cpp:370
transaction.h
CWallet::createMasterKey
void createMasterKey() const
Definition: wallet.cpp:6973
CWallet::ScanForWalletTransactions
int ScanForWalletTransactions(CBlockIndex *pindexStart, bool fUpdate=false, bool fromStartup=false, int height=-1)
Scan the block chain (starting in pindexStart) for transactions from or to us.
Definition: wallet.cpp:2062
CKeyPool
A key pool entry.
Definition: wallet.h:126
AvailableCoinsType
AvailableCoinsType
Definition: wallet.h:109
CWallet::RemoveFromSpends
void RemoveFromSpends(const uint256 &wtxid)
Definition: wallet.cpp:1768
CWallet::nLastResend
int64_t nLastResend
Definition: wallet.h:260
CWallet::GetImmatureBalance
CAmount GetImmatureBalance() const
Definition: wallet.cpp:2333
CWallet::DeriveNewChildKey
void DeriveNewChildKey(uint32_t nAccountIndex, CKey &secretRet)
Definition: wallet.cpp:6860
CWallet::CommitTransaction
bool CommitTransaction(CWalletTx &wtxNew, CReserveKey &reservekey, std::string strCommand=NetMsgType::TX)
Call after CreateTransaction unless you want to abort.
Definition: wallet.cpp:4458
CWalletTx::fWatchCreditCached
bool fWatchCreditCached
Definition: wallet.h:814
CWallet::GetOldestKeyPoolTime
int64_t GetOldestKeyPoolTime()
Definition: wallet.cpp:4847
CWallet::RevealTxOutAmount
bool RevealTxOutAmount(const CTransaction &tx, const CTxOut &out, CAmount &amount, CKey &) const
Definition: wallet.cpp:7047
CWallet::nStakeSplitThreshold
uint64_t nStakeSplitThreshold
Definition: wallet.h:317
CWalletTx::fTimeReceivedIsTxTime
unsigned int fTimeReceivedIsTxTime
Definition: wallet.h:800
CWallet::IsMine
isminetype IsMine(const CTxIn &txin) const
Definition: wallet.cpp:1333
CDataStream::begin
const_iterator begin() const
Definition: streams.h:116
CWalletTx::nImmatureCreditCached
CAmount nImmatureCreditCached
Definition: wallet.h:821
CCryptoKeyStore
Keystore which keeps the private keys encrypted.
Definition: crypter.h:127
CWallet::TxItems
std::multimap< int64_t, TxPair > TxItems
Definition: wallet.h:348
CWallet::CWallet
CWallet()
Definition: wallet.cpp:6090
fPayAtLeastCustomFee
bool fPayAtLeastCustomFee
Definition: wallet.cpp:57
ALL_COINS
@ ALL_COINS
Definition: wallet.h:110
CWallet::keyImageMap
std::map< std::string, std::string > keyImageMap
Definition: wallet.h:370
CWallet::CreateCoinStake
bool CreateCoinStake(const CKeyStore &keystore, unsigned int nBits, int64_t nSearchInterval, CMutableTransaction &txNew, unsigned int &nTxNewTime)
Definition: wallet.cpp:4302
CKeyPool::SerializationOp
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
Definition: wallet.h:138
CWallet::isMatchMyKeyImage
bool isMatchMyKeyImage(const CKeyImage &ki, const COutPoint &out)
Definition: wallet.cpp:961
CWallet::GetKeyFromPool
bool GetKeyFromPool(CPubKey &key)
Definition: wallet.cpp:4829
CMerkleTx::SerializationOp
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
Definition: wallet.h:759
CWalletTx::mapValue
mapValue_t mapValue
Definition: wallet.h:798
CWallet::GetConflicts
std::set< uint256 > GetConflicts(const uint256 &txid) const
Get wallet transactions that conflict with given transaction (spend same outputs)
Definition: wallet.cpp:754
CWallet::AddHDPubKey
bool AddHDPubKey(const CExtPubKey &extPubKey, bool fInternal, uint32_t nAccountIndex)
Adds a HDPubKey into the wallet(database)
Definition: wallet.cpp:6948
CWalletTx::CWalletTx
CWalletTx()
Definition: wallet.cpp:6244
CBitcoinAddress
base58-encoded PRCY addresses.
Definition: base58.h:109
CWallet::Write2FALastTime
bool Write2FALastTime(uint64_t lastTime)
Definition: wallet.cpp:402
CWallet::Read2FALastTime
uint64_t Read2FALastTime()
Definition: wallet.cpp:406
CTxMemPool
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
Definition: txmempool.h:97
CKeyingMaterial
std::vector< unsigned char, secure_allocator< unsigned char > > CKeyingMaterial
Definition: crypter.h:69
CWallet::mapRequestCount
std::map< uint256, int > mapRequestCount
Definition: wallet.h:352
FEATURE_LATEST
@ FEATURE_LATEST
Definition: wallet.h:106
CCoinControl
Coin Control Features.
Definition: coincontrol.h:15
CWallet::Unlock
bool Unlock(const SecureString &strWalletPassphrase, bool anonimizeOnly=false)
Definition: wallet.cpp:552
STAKABLE_NEED_CONSOLIDATION_WITH_RESERVE_BALANCE
@ STAKABLE_NEED_CONSOLIDATION_WITH_RESERVE_BALANCE
Definition: wallet.h:231
CompactTallyItem
Definition: wallet.h:115
CWallet::IsFromMe
bool IsFromMe(const CTransaction &tx) const
should probably be renamed to IsRelevantToMe
Definition: wallet.cpp:6190
CReserveKey
A key allocated from the key pool.
Definition: wallet.h:679
CPrivKey
std::vector< unsigned char, secure_allocator< unsigned char > > CPrivKey
secp256k1: const unsigned int PRIVATE_KEY_SIZE = 279; const unsigned int PUBLIC_KEY_SIZE = 65; const ...
Definition: key.h:20
CWallet::AddAccountingEntry
bool AddAccountingEntry(const CAccountingEntry &, CWalletDB &pwalletdb)
Definition: wallet.cpp:4510
validationinterface.h
CMerkleTx::CMerkleTx
CMerkleTx(const CTransaction &txIn)
Definition: wallet.h:745
CWallet::inSpendQueueOutpointsPerSession
std::vector< COutPoint > inSpendQueueOutpointsPerSession
Definition: wallet.h:373
CWallet::SetMaxVersion
bool SetMaxVersion(int nVersion)
change which version we're allowed to upgrade to (note that this does not immediately imply upgrading...
Definition: wallet.cpp:742
CReserveKey::vchPubKey
CPubKey vchPubKey
Definition: wallet.h:684
CWallet::GetSpendableBalance
CAmount GetSpendableBalance()
Definition: wallet.cpp:2260
CWallet::inSpendQueueOutpoints
std::map< COutPoint, bool > inSpendQueueOutpoints
Definition: wallet.h:372
CWallet::nAutoCombineThreshold
CAmount nAutoCombineThreshold
Definition: wallet.h:332
CWalletTx::nWatchCreditCached
CAmount nWatchCreditCached
Definition: wallet.h:824
CWalletKey::vchPrivKey
CPrivKey vchPrivKey
Definition: wallet.h:951
CWalletTx::GetAvailableWatchOnlyCredit
CAmount GetAvailableWatchOnlyCredit(const bool &fUseCache=true) const
Definition: wallet.cpp:1656
CWallet::generateBulletProofAggregate
bool generateBulletProofAggregate(CTransaction &tx)
Definition: wallet.cpp:3564
CWallet::LoadCryptedKey
bool LoadCryptedKey(const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret)
Adds an encrypted key to the store, without saving it to disk (used by LoadWallet)
Definition: wallet.cpp:440
CWalletTx::GetComputedTxTime
int64_t GetComputedTxTime() const
Definition: wallet.cpp:1439
CompactTallyItem::CompactTallyItem
CompactTallyItem()
Definition: wallet.h:119
CWallet::StakingCoinStatus
StakingStatusError StakingCoinStatus(CAmount &minFee, CAmount &maxFee)
Definition: wallet.cpp:2712
CWallet::ComputeFee
int ComputeFee(size_t numIn, size_t numOut, size_t ringSize)
Definition: wallet.cpp:3139
CWallet::NotifyWatchonlyChanged
boost::signals2::signal< void(bool fHaveWatchOnly)> NotifyWatchonlyChanged
Watch-only address added.
Definition: wallet.h:613
CWalletTx::fAvailableWatchCreditCached
bool fAvailableWatchCreditCached
Definition: wallet.h:816
CWallet::LoadKey
bool LoadKey(const CKey &key, const CPubKey &pubkey)
Adds a key to the store, without saving it to disk (used by LoadWallet)
Definition: wallet.h:433
UNSTAKABLE_BALANCE_RESERVE_TOO_HIGH
@ UNSTAKABLE_BALANCE_RESERVE_TOO_HIGH
Definition: wallet.h:228
AnnotatedMixin< std::recursive_mutex >
CWallet::strMultiSendChangeAddress
std::string strMultiSendChangeAddress
Definition: wallet.h:326
CWallet::GetChange
CAmount GetChange(const CTransaction &tx, const CTxOut &txout) const
Definition: wallet.cpp:6177
CWallet::ReadStealthAccount
bool ReadStealthAccount(const std::string &strAccount, CStealthAccount &account)
Definition: wallet.cpp:6374
CWallet::IsSpent
bool IsSpent(const uint256 &hash, unsigned int n)
Outpoint is spent if any non-conflicted transaction spends it:
Definition: wallet.cpp:860
CWallet::CreateTransaction
bool CreateTransaction(CScript scriptPubKey, int64_t nValue, CWalletTx &wtxNew, CReserveKey &reservekey, int64_t &nFeeRet, std::string &strFailReason, const CCoinControl *coinControl)
UNSTAKABLE_BALANCE_RESERVE_TOO_HIGH_CONSOLIDATION_FAILED
@ UNSTAKABLE_BALANCE_RESERVE_TOO_HIGH_CONSOLIDATION_FAILED
Definition: wallet.h:229
CReserveKey::nIndex
int64_t nIndex
Definition: wallet.h:683
CWallet::CreateTransactionBulletProof
bool CreateTransactionBulletProof(const CKey &txPrivDes, const CPubKey &recipientViewKey, const std::vector< std::pair< CScript, CAmount > > &vecSend, CWalletTx &wtxNew, CReserveKey &reservekey, CAmount &nFeeRet, std::string &strFailReason, const CCoinControl *coinControl=NULL, AvailableCoinsType coin_type=ALL_COINS, bool useIX=false, CAmount nFeePay=0, int ringSize=6, bool tomyself=false)
Definition: wallet.cpp:3171
CWallet::getWalletTxs
std::vector< CWalletTx > getWalletTxs()
Definition: wallet.cpp:176
isminetype
isminetype
IsMine() return codes.
Definition: wallet_ismine.h:16
CWallet::WriteAutoConsolidateSettingTime
bool WriteAutoConsolidateSettingTime(uint32_t settingTime)
Definition: wallet.cpp:3156
CWallet::GetMinimumFee
static CAmount GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool &pool)
Definition: wallet.cpp:4522
CWallet::GetAccountAddresses
std::set< CTxDestination > GetAccountAddresses(std::string strAccount) const
Definition: wallet.cpp:4979
CKeyID
A reference to a CKey: the Hash160 of its serialized public key.
Definition: pubkey.h:29
CWallet::makeRingCT
bool makeRingCT(CTransaction &wtxNew, int ringSize, std::string &strFailReason)
Definition: wallet.cpp:3587
CWallet::ComputeStealthPublicAddress
bool ComputeStealthPublicAddress(const std::string &accountName, std::string &pubAddress)
Definition: wallet.cpp:6379
CReserveKey::GetReservedKey
bool GetReservedKey(CPubKey &pubkey)
Definition: wallet.cpp:4992
CKeyPool::nTime
int64_t nTime
Definition: wallet.h:129
guiinterface.h
CWalletTx::nAvailableCreditCached
CAmount nAvailableCreditCached
Definition: wallet.h:822
CStealthAccount::SetNull
void SetNull()
Definition: wallet.h:206
CWallet::nAutoCombineTarget
CAmount nAutoCombineTarget
Definition: wallet.h:333
CWallet::keyImagesSpends
std::map< std::string, bool > keyImagesSpends
Definition: wallet.h:369
CMerkleTx::GetDepthInMainChainINTERNAL
int GetDepthInMainChainINTERNAL(const CBlockIndex *&pindexRet) const
Definition: wallet.cpp:5982
CStealthAccount
Definition: wallet.h:195
CWallet::TxPair
std::pair< CWalletTx *, CAccountingEntry * > TxPair
Definition: wallet.h:347
CWallet::nOrderPosNext
int64_t nOrderPosNext
Definition: wallet.h:351
CWallet::GetAddressBalances
std::map< CTxDestination, CAmount > GetAddressBalances()
Definition: wallet.cpp:4858
CWallet::AddToSpends
void AddToSpends(const COutPoint &outpoint, const uint256 &wtxid)
Definition: wallet.cpp:901
CWalletKey::strComment
std::string strComment
Definition: wallet.h:954
CWallet::blindMap
std::map< CScript, CKey > blindMap
Definition: wallet.h:375
CDataStream::insert
iterator insert(iterator it, const char &x=char())
Definition: streams.h:131
CFeeRate
Fee rate in PRCY per kilobyte: CAmount / kB.
Definition: amount.h:39
CWallet::AddKeyPubKey
bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey)
Adds a key to the store, and saves it to disk.
Definition: wallet.cpp:240
CWallet::UnlockCoin
void UnlockCoin(COutPoint &output)
Definition: wallet.cpp:5063
CWallet::DecoyConfirmationMinimum
int64_t DecoyConfirmationMinimum
Definition: wallet.h:366
CWallet::coinbaseDecoysPool
std::map< COutPoint, uint256 > coinbaseDecoysPool
Definition: wallet.h:377
CWalletTx::fSpent
char fSpent
position in ordered transaction list
Definition: wallet.h:806
CWalletTx::nAvailableWatchCreditCached
CAmount nAvailableWatchCreditCached
Definition: wallet.h:826
UNSTAKABLE_BALANCE_TOO_LOW_CONSOLIDATION_FAILED
@ UNSTAKABLE_BALANCE_TOO_LOW_CONSOLIDATION_FAILED
Definition: wallet.h:227
CWalletTx::nChangeCached
CAmount nChangeCached
Definition: wallet.h:827
CWalletTx::nTimeSmart
unsigned int nTimeSmart
time received by this node
Definition: wallet.h:802
CWallet::AddDestData
bool AddDestData(const CTxDestination &dest, const std::string &key, const std::string &value)
Adds a destination data tuple to the store, and saves it to disk.
Definition: wallet.cpp:5226
CTransaction
The basic transaction that is broadcasted on the network and contained in blocks.
Definition: transaction.h:269
CWalletTx::fImmatureWatchCreditCached
bool fImmatureWatchCreditCached
Definition: wallet.h:815
CCryptoKeyStore::AddKeyPubKey
bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey)
Add a key to the store.
Definition: crypter.cpp:138
CAccountingEntry::strAccount
std::string strAccount
Definition: wallet.h:985
CWallet::GetKeyBirthTimes
void GetKeyBirthTimes(std::map< CKeyID, int64_t > &mapKeyBirth) const
Definition: wallet.cpp:5131
CWallet::ComputeTxSize
static int ComputeTxSize(size_t numIn, size_t numOut, size_t ringSize)
Definition: wallet.cpp:3123
CAccount::SerializationOp
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
Definition: wallet.h:186
CWallet::AddCScript
bool AddCScript(const CScript &redeemScript)
Support for BIP 0013 : see https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki.
Definition: wallet.cpp:445
CHDPubKey
Definition: hdchain.h:92
CWallet::nHashDrift
unsigned int nHashDrift
Definition: wallet.h:315
CWallet::Write2FASecret
bool Write2FASecret(std::string secret)
Definition: wallet.cpp:384
CWallet::KeepKey
void KeepKey(int64_t nIndex)
Definition: wallet.cpp:4809
CWallet::UpdateWalletTransactionOrder
void UpdateWalletTransactionOrder(std::map< std::pair< int, int >, CWalletTx * > &mapSorted, bool resetOrder)
Update the nOrderPos with passed in ordered map.
Definition: wallet.cpp:1825
CWallet::vDisabledAddresses
std::vector< std::string > vDisabledAddresses
Definition: wallet.h:328
CWallet::nWalletVersion
int nWalletVersion
the current wallet version: clients below this version are not able to load the wallet
Definition: wallet.h:254
CWalletTx::fWatchDebitCached
bool fWatchDebitCached
Definition: wallet.h:813
CWallet::GetMasternodeVinAndKeys
bool GetMasternodeVinAndKeys(CTxIn &txinRet, CPubKey &pubKeyRet, CKey &keyRet, std::string strTxHash, std::string strOutputIndex, std::string &strError)
Get 5000 PRCY output and keys which can be used for the Masternode.
Definition: wallet.cpp:2409
CWallet::SetAddressBook
bool SetAddressBook(const CTxDestination &address, const std::string &strName, const std::string &purpose)
Definition: wallet.cpp:4589
CWallet::NotifyWalletBacked
boost::signals2::signal< void(const bool &fSuccess, const std::string &filename)> NotifyWalletBacked
notify wallet file backed up
Definition: wallet.h:616
CWallet::fDecryptionThoroughlyChecked
bool fDecryptionThoroughlyChecked
keeps track of whether Unlock has run a thorough check before
Definition: wallet.h:251
CWallet::MarkDirty
void MarkDirty()
Definition: wallet.cpp:1162
CWallet::SetBestChain
void SetBestChain(const CBlockLocator &loc)
Definition: wallet.cpp:710
CWallet::DelAddressBook
bool DelAddressBook(const CTxDestination &address)
Definition: wallet.cpp:4609
CWallet::EncodeIntegratedAddress
bool EncodeIntegratedAddress(const CPubKey &pubViewKey, const CPubKey &pubSpendKey, uint64_t paymentID, std::string &pubAddr)
Definition: wallet.cpp:6478
CWallet::AddComputedPrivateKey
void AddComputedPrivateKey(const CTxOut &out)
Definition: wallet.cpp:4264
CompactTallyItem::nAmount
CAmount nAmount
Definition: wallet.h:117
CAccountingEntry::nCreditDebit
CAmount nCreditDebit
Definition: wallet.h:986
CWallet::GetBudgetSystemCollateralTX
bool GetBudgetSystemCollateralTX(CTransaction &tx, uint256 hash, bool useIX)
Definition: wallet.cpp:3063
CWallet::ComputeStealthDestination
static bool ComputeStealthDestination(const CKey &secret, const CPubKey &pubViewKey, const CPubKey &pubSpendKey, CPubKey &des)
Definition: wallet.cpp:6618
CWallet::GetUnconfirmedWatchOnlyBalance
CAmount GetUnconfirmedWatchOnlyBalance() const
Definition: wallet.cpp:2361
CWallet::SetMinVersion
bool SetMinVersion(enum WalletFeature, CWalletDB *pwalletdbIn=NULL, bool fExplicit=false)
signify that a particular wallet feature is now used. this may change nWalletVersion and nWalletMaxVe...
Definition: wallet.cpp:716
CMerkleTx::nIndex
int nIndex
Definition: wallet.h:738
CWalletTx::nTimeReceived
unsigned int nTimeReceived
Definition: wallet.h:801
COutput::Value
CAmount Value() const
Definition: wallet.h:938
CWallet::MAX_DECOY_POOL
static const int32_t MAX_DECOY_POOL
Definition: wallet.h:276
StakingStatusError
StakingStatusError
Definition: wallet.h:223
CombineMode
CombineMode
Definition: wallet.h:234
COutput::ToString
std::string ToString() const
Definition: wallet.cpp:162
CMerkleTx
A transaction with a merkle branch linking it to the block chain.
Definition: wallet.h:731
CWallet::fMultiSendNotify
bool fMultiSendNotify
Definition: wallet.h:325
payTxFee
CFeeRate payTxFee
Settings.
CWalletKey::nTimeCreated
int64_t nTimeCreated
Definition: wallet.h:952
CWallet::resetPendingOutPoints
void resetPendingOutPoints()
Definition: wallet.cpp:2998
bSpendZeroConfChange
bool bSpendZeroConfChange
Definition: wallet.cpp:54
CWallet::nStakeSetUpdateTime
int nStakeSetUpdateTime
Definition: wallet.h:318
CWallet::ReserveKeyFromKeyPool
void ReserveKeyFromKeyPool(int64_t &nIndex, CKeyPool &keypool)
Definition: wallet.cpp:4739
CWalletTx::GetCredit
CAmount GetCredit(const isminefilter &filter) const
Definition: wallet.cpp:1505
CWallet::GenerateNewHDChain
void GenerateNewHDChain(std::string *phrase=NULL)
Definition: wallet.cpp:317
CWalletTx::nOrderPos
int64_t nOrderPos
Definition: wallet.h:805
CTxOut
An output of a transaction.
Definition: transaction.h:164
CWallet::AvailableCoinsByAddress
std::map< CBitcoinAddress, std::vector< COutput > > AvailableCoinsByAddress(bool fConfirmed=true, CAmount maxCoinValue=0)
Definition: wallet.cpp:2562
CWallet::ComputeIntegratedPublicAddress
bool ComputeIntegratedPublicAddress(const uint64_t paymentID, const std::string &accountName, std::string &pubAddress)
Definition: wallet.cpp:6388
STAKABLE_NEED_CONSOLIDATION
@ STAKABLE_NEED_CONSOLIDATION
Definition: wallet.h:230
tx_verify.h
CStealthAccount::CStealthAccount
CStealthAccount()
Definition: wallet.h:201
mapValue_t
std::map< std::string, std::string > mapValue_t
Definition: wallet.h:704
CWallet::vchDefaultKey
CPubKey vchDefaultKey
Definition: wallet.h:358
CWallet::GenerateIntegratedAddress
bool GenerateIntegratedAddress(const std::string &accountName, std::string &pubAddr)
Definition: wallet.cpp:6486
CWallet::GenerateIntegratedAddressWithProvidedPaymentID
std::string GenerateIntegratedAddressWithProvidedPaymentID(std::string accountName, uint64_t paymentID)
Definition: wallet.cpp:6512
CWalletTx::fChangeCached
bool fChangeCached
Definition: wallet.h:817
CTransaction::vout
std::vector< CTxOut > vout
Definition: transaction.h:286
CWallet::vMultiSend
std::vector< std::pair< std::string, int > > vMultiSend
Definition: wallet.h:322
CKeyPool::ADD_SERIALIZE_METHODS
ADD_SERIALIZE_METHODS
Definition: wallet.h:135
CWallet::MakeShnorrSignatureTxIn
bool MakeShnorrSignatureTxIn(CTxIn &txin, uint256)
Definition: wallet.cpp:4008
CWallet::GetCredit
CAmount GetCredit(const CTransaction &tx, const CTxOut &txout, const isminefilter &filter) const
Definition: wallet.cpp:6172
CWallet::IsLockedCoin
bool IsLockedCoin(uint256 hash, unsigned int n) const
Definition: wallet.cpp:5075
CWallet::TxSpends
std::multimap< COutPoint, uint256 > TxSpends
Used to keep track of spent outpoints, and detect and report conflicts (double-spends or mutated tran...
Definition: wallet.h:267
CMerkleTx::CMerkleTx
CMerkleTx()
Definition: wallet.h:740
COutputEntry::vout
int vout
Definition: wallet.h:727
CWallet::nLastMultiSendHeight
int nLastMultiSendHeight
Definition: wallet.h:327
CWallet::mySpendPrivateKey
bool mySpendPrivateKey(CKey &spend) const
Definition: wallet.cpp:7004
CWallet::GetUniqueWalletBackupName
std::string GetUniqueWalletBackupName() const
Definition: wallet.cpp:6081
CWallet::userDecoysPool
std::map< COutPoint, uint256 > userDecoysPool
Definition: wallet.h:376
CWalletTx::GetDebit
CAmount GetDebit(const isminefilter &filter) const
Definition: wallet.cpp:1478
nTxConfirmTarget
unsigned int nTxConfirmTarget
Definition: wallet.cpp:53
CWalletTx::nDebitCached
CAmount nDebitCached
Definition: wallet.h:819
CWallet::IsMasternodeController
bool IsMasternodeController()
Definition: wallet.cpp:3058
CAddressBookData
Address book data.
Definition: wallet.h:148
STAKING_OK
@ STAKING_OK
Definition: wallet.h:225
CWalletTx::SerializationOp
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
Definition: wallet.h:839
CWallet::computeSharedSec
bool computeSharedSec(const CTransaction &tx, const CTxOut &out, CPubKey &sharedSec) const
Definition: wallet.cpp:4252
COutputEntry::destination
CTxDestination destination
Definition: wallet.h:725
CWallet::IsChange
bool IsChange(const CTxOut &txout) const
Definition: wallet.cpp:1419
CWallet::nNextResend
int64_t nNextResend
Definition: wallet.h:259
CWallet::GetLockedCoins
CAmount GetLockedCoins() const
Definition: wallet.cpp:2300
CWallet::wtxOrdered
TxItems wtxOrdered
Definition: wallet.h:349
SecureString
std::basic_string< char, std::char_traits< char >, secure_allocator< char > > SecureString
Definition: allocators.h:262
CWallet::mapHdPubKeys
std::map< CKeyID, CHDPubKey > mapHdPubKeys
Definition: wallet.h:361
CWallet::GetWalletTx
const CWalletTx * GetWalletTx(const uint256 &hash) const
Definition: wallet.cpp:167
CDataStream::end
const_iterator end() const
Definition: streams.h:118
CWallet::AddToWallet
bool AddToWallet(const CWalletTx &wtxIn, bool fFromLoadWallet, CWalletDB *pwalletdb)
Definition: wallet.cpp:1171
CWallet::LoadMinVersion
bool LoadMinVersion(int nVersion)
Definition: wallet.cpp:6159
CWallet::IsHDEnabled
bool IsHDEnabled()
Definition: wallet.cpp:345
CWallet::ShowProgress
boost::signals2::signal< void(const std::string &title, int nProgress)> ShowProgress
Show progress e.g.
Definition: wallet.h:610
CWallet::NewKeyPool
bool NewKeyPool()
Mark old keypool keys as used, and generate all new keys.
Definition: wallet.cpp:4646
CWalletTx::RelayWalletTransaction
void RelayWalletTransaction(std::string strCommand=NetMsgType::TX)
Definition: wallet.cpp:2169
CWalletDB
Access to the wallet database (wallet.dat)
Definition: walletdb.h:80
COutputEntry
Definition: wallet.h:724
CWallet::LoadHDPubKey
bool LoadHDPubKey(const CHDPubKey &hdPubKey)
loads a HDPubKey into the wallets memory
Definition: wallet.cpp:6940
CWallet::GetVersion
int GetVersion()
get the current wallet format (the oldest client version guaranteed to understand this wallet)
Definition: wallet.cpp:6238
CWallet::outpointToKeyImages
std::map< std::string, CKeyImage > outpointToKeyImages
Definition: wallet.h:368
CWallet::LoadWallet
DBErrors LoadWallet(bool &fFirstRunRet)
Definition: wallet.cpp:4540
CAmount
int64_t CAmount
Amount in PRCY (Can be negative)
Definition: amount.h:17
CMerkleTx::AcceptToMemoryPool
bool AcceptToMemoryPool(bool fLimitFree=true, bool fRejectInsaneFee=true, bool ignoreFees=false)
Definition: wallet.cpp:6045
CWallet::getCOutPutValue
CAmount getCOutPutValue(const COutput &output) const
Definition: wallet.cpp:7193
CWallet::GetAllReserveKeys
void GetAllReserveKeys(std::set< CKeyID > &setAddress) const
Definition: wallet.cpp:5024
CWalletTx::fAvailableCreditCached
bool fAvailableCreditCached
Definition: wallet.h:812
CKeyPool::vchPubKey
CPubKey vchPubKey
Definition: wallet.h:130
CAccountingEntry::strOtherAccount
std::string strOtherAccount
Definition: wallet.h:988
CStealthAccount::spendAccount
CAccount spendAccount
Definition: wallet.h:198
CWallet::~CWallet
~CWallet()
Definition: wallet.cpp:6103
CompactTallyItem::address
CBitcoinAddress address
Definition: wallet.h:116
fSendFreeTransactions
bool fSendFreeTransactions
Definition: wallet.cpp:56
CWallet::ReorderWalletTransactions
void ReorderWalletTransactions(std::map< std::pair< int, int >, CWalletTx * > &mapSorted, int64_t &maxOrderPos)
Reorder the transactions based on block hieght and block index.
Definition: wallet.cpp:1792
CWallet::Read2FAPeriod
int Read2FAPeriod()
Definition: wallet.cpp:397
CWallet::amountMap
std::map< CScript, CAmount > amountMap
Definition: wallet.h:374
CAccountingEntry::_ssExtra
std::vector< char > _ssExtra
Definition: wallet.h:1053
CWallet::mapMasterKeys
MasterKeyMap mapMasterKeys
Definition: wallet.h:311
keystore.h
CWallet::selectDecoysAndRealIndex
bool selectDecoysAndRealIndex(CTransaction &tx, int &myIndex, int ringSize)
Definition: wallet.cpp:4039
CAccount
Account information.
Definition: wallet.h:167
CWallet::GetBalance
CAmount GetBalance()
Definition: wallet.cpp:2243
CStealthAccount::SerializationOp
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
Definition: wallet.h:215
CWalletTx::vOrderForm
std::vector< std::pair< std::string, std::string > > vOrderForm
Definition: wallet.h:799
uint256
256-bit unsigned big integer.
Definition: uint256.h:38
CWallet::GetUnconfirmedBalance
CAmount GetUnconfirmedBalance() const
Definition: wallet.cpp:2319
CWalletTx::BindWallet
void BindWallet(CWallet *pwalletIn)
Definition: wallet.cpp:6340
CWalletTx::pwallet
CWallet * pwallet
Definition: wallet.h:795
CWallet::CreateCommitment
static bool CreateCommitment(const CAmount val, CKey &blind, std::vector< unsigned char > &commitment)
Definition: wallet.cpp:3096
CWallet::IsAutoConsolidateOn
bool IsAutoConsolidateOn()
Definition: wallet.cpp:3166
CWalletTx::GetTxTime
int64_t GetTxTime() const
Definition: wallet.cpp:1433
CWalletTx::nCreditCached
CAmount nCreditCached
Definition: wallet.h:820
CScript
Serialized script, used inside transaction inputs and outputs.
Definition: script.h:363
CWallet::DeleteWalletTransactions
bool DeleteWalletTransactions(const CBlockIndex *pindex, bool fRescan=false)
Definition: wallet.cpp:1909
CWalletTx::GetUnlockedCredit
CAmount GetUnlockedCredit() const
filter decides which addresses will count towards the debit
Definition: wallet.cpp:1586
CWalletTx::strFromAccount
std::string strFromAccount
Definition: wallet.h:804
CAccount::ADD_SERIALIZE_METHODS
ADD_SERIALIZE_METHODS
Definition: wallet.h:183
CWallet::SendToStealthAddress
bool SendToStealthAddress(const std::string &stealthAddr, CAmount nValue, CWalletTx &wtxNew, bool fUseIX=false, int ringSize=5)
Definition: wallet.cpp:6640
ONLY_5000
@ ONLY_5000
Definition: wallet.h:111
COutput::fSpendable
bool fSpendable
Definition: wallet.h:928
CWallet::generateKeyImage
bool generateKeyImage(const CPubKey &pub, CKeyImage &img) const
Definition: wallet.cpp:7162
fDeleteTransactionsAfterNBlocks
unsigned int fDeleteTransactionsAfterNBlocks
Definition: wallet.cpp:63
CWallet::walletIdxCache
int walletIdxCache
Definition: wallet.h:672
COutput::nDepth
int nDepth
Definition: wallet.h:927
CWallet::GetDebit
CAmount GetDebit(const CTxIn &txin, const isminefilter &filter) const
Definition: wallet.cpp:1402
CWalletTx::GetLockedCredit
CAmount GetLockedCredit() const
Definition: wallet.cpp:1610
CWalletKey::CWalletKey
CWalletKey(int64_t nExpires=0)
Definition: wallet.cpp:5947
CAddressBookData::CAddressBookData
CAddressBookData()
Definition: wallet.h:154
CStealthAccount::ADD_SERIALIZE_METHODS
ADD_SERIALIZE_METHODS
Definition: wallet.h:212
CWalletTx::InMempool
bool InMempool() const
Definition: wallet.cpp:2160
CWallet::GetWatchOnlyBalance
CAmount GetWatchOnlyBalance() const
Definition: wallet.cpp:2346
CWallet::GetImmatureWatchOnlyBalance
CAmount GetImmatureWatchOnlyBalance() const
Definition: wallet.cpp:2375
CWallet::encodeStealthBase58
bool encodeStealthBase58(const std::vector< unsigned char > &raw, std::string &stealth)
Definition: wallet.cpp:6406
CWallet::SelectCoins
bool SelectCoins(bool needFee, CAmount &estimatedFee, int ringSize, int numOut, const CAmount &nTargetValue, std::set< std::pair< const CWalletTx *, unsigned int > > &setCoinsRet, CAmount &nValueRet, const CCoinControl *coinControl=NULL, AvailableCoinsType coin_type=ALL_COINS, bool useIX=true)
Definition: wallet.cpp:3023
CWallet::LoadWatchOnly
bool LoadWatchOnly(const CScript &dest)
Adds a watch-only address to the store, without saving it to disk (used by LoadWallet)
Definition: wallet.cpp:494
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
CWallet::IsCollateralized
bool IsCollateralized(const COutPoint &outpoint)
Definition: wallet.cpp:3048
CWallet::AddCryptedKey
bool AddCryptedKey(const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret)
Adds an encrypted key to the store, and saves it to disk.
Definition: wallet.cpp:411
CReserveKey::~CReserveKey
~CReserveKey()
Definition: wallet.h:693
CWalletTx::GetBlockHeight
int GetBlockHeight() const
Definition: wallet.cpp:6360
CWallet::Lock
bool Lock()
Lock Wallet.
Definition: wallet.cpp:582
CWallet::laccentries
std::list< CAccountingEntry > laccentries
Definition: wallet.h:345
CWallet::setMultiSendDisabled
void setMultiSendDisabled()
Definition: wallet.cpp:6147
CAccountingEntry::nTime
int64_t nTime
Definition: wallet.h:987
CWallet::SetHDChain
bool SetHDChain(const CHDChain &chain, bool memonly)
Definition: wallet.cpp:260
CKeyPool::CKeyPool
CKeyPool()
Definition: wallet.cpp:5936
CWallet::EncryptWallet
bool EncryptWallet(const SecureString &strWalletPassphrase)
Definition: wallet.cpp:1049
ChangeType
ChangeType
General change type (added, updated, removed).
Definition: guiinterface.h:21
fDeleteInterval
int fDeleteInterval
Definition: wallet.cpp:62
CWallet::PROBABILITY_NEW_COIN_SELECTED
static const int32_t PROBABILITY_NEW_COIN_SELECTED
Definition: wallet.h:277
CWalletTx::GetImmatureCredit
CAmount GetImmatureCredit(bool fUseCache=true) const
Definition: wallet.cpp:1534
CWallet::findCorrespondingPrivateKey
bool findCorrespondingPrivateKey(const CTxOut &txout, CKey &key) const
Definition: wallet.cpp:7108
CWallet::SyncTransaction
void SyncTransaction(const CTransaction &tx, const CBlock *pblock)
Definition: wallet.cpp:1303
CBlock
Definition: block.h:142
COutput::tx
const CWalletTx * tx
Definition: wallet.h:925
CWallet::DecodeStealthAddress
static bool DecodeStealthAddress(const std::string &stealth, CPubKey &pubViewKey, CPubKey &pubSpendKey, bool &hasPaymentID, uint64_t &paymentID)
Definition: wallet.cpp:6522
FEATURE_BASE
@ FEATURE_BASE
Definition: wallet.h:101
strprintf
#define strprintf
Definition: tinyformat.h:1056
CAccountingEntry::ADD_SERIALIZE_METHODS
ADD_SERIALIZE_METHODS
Definition: wallet.h:1010
atoi64
int64_t atoi64(const char *psz)
Definition: utilstrencodings.cpp:569
CWallet::fCombineDust
bool fCombineDust
Definition: wallet.h:331
key.h
CWallet::ScanWalletKeyImages
void ScanWalletKeyImages()
Definition: wallet.cpp:4529
COutput::COutput
COutput(const CWalletTx *txIn, int iIn, int nDepthIn, bool fSpendableIn)
Definition: wallet.h:930
DBErrors
DBErrors
Error statuses for the wallet database.
Definition: walletdb.h:36
bdisableSystemnotifications
bool bdisableSystemnotifications
Definition: wallet.cpp:55
CAddressBookData::purpose
std::string purpose
Definition: wallet.h:152
CMerkleTx::SetMerkleBranch
int SetMerkleBranch(const CBlock &block)
Definition: wallet.cpp:5953
CWallet::AutoCombineDust
void AutoCombineDust()
Definition: wallet.cpp:5728
CPubKey
An encapsulated public key.
Definition: pubkey.h:37
CWallet::Inventory
void Inventory(const uint256 &hash)
Definition: wallet.cpp:6222
CWallet::CreateSweepingTransaction
bool CreateSweepingTransaction(CAmount target, CAmount threshold, uint32_t nTimeBefore)
Definition: wallet.cpp:5472
CWallet::AvailableCoins
bool AvailableCoins(std::vector< COutput > &vCoins, bool fOnlyConfirmed=true, const CCoinControl *coinControl=NULL, bool fIncludeZeroValue=false, AvailableCoinsType nCoinType=ALL_COINS, bool fUseIX=false)
populate vCoins with vector of available COutputs.
Definition: wallet.cpp:2490
CWallet::DeleteTransactions
bool DeleteTransactions(std::vector< uint256 > &removeTxs, bool fRescan=false)
Delete transactions from the Wallet.
Definition: wallet.cpp:1877
CAccount::vchPubKey
CPubKey vchPubKey
Definition: wallet.h:170
READWRITE
#define READWRITE(obj)
Definition: serialize.h:164
CWallet::SetDefaultKey
bool SetDefaultKey(const CPubKey &vchPubKey)
Definition: wallet.cpp:4632
CWallet::SetCryptedHDChain
bool SetCryptedHDChain(const CHDChain &chain, bool memonly)
Definition: wallet.cpp:273
CAccount::CAccount
CAccount()
Definition: wallet.h:173
CWalletTx::GetAmounts
void GetAmounts(std::list< COutputEntry > &listReceived, std::list< COutputEntry > &listSent, CAmount &nFee, std::string &strSentAccount, const isminefilter &filter) const
Definition: wallet.cpp:1681
CMerkleTx::GetBlocksToMaturity
int GetBlocksToMaturity() const
Definition: wallet.cpp:6025
NetMsgType::TX
const char * TX
The tx message transmits a single transaction.
Definition: protocol.cpp:25
CAccountingEntry::SetNull
void SetNull()
Definition: wallet.h:999
CWallet::GetTransactionType
std::string GetTransactionType(const CTransaction &tx)
Definition: wallet.cpp:910
CWallet::IsTransactionForMe
bool IsTransactionForMe(const CTransaction &tx)
Definition: wallet.cpp:6705
CKey
An encapsulated private key.
Definition: key.h:39
CReserveKey::KeepKey
void KeepKey()
Definition: wallet.cpp:5008
CWallet::TopUpKeyPool
bool TopUpKeyPool(unsigned int kpSize=0)
Definition: wallet.cpp:4706
fKeepLastNTransactions
unsigned int fKeepLastNTransactions
Definition: wallet.cpp:64
ON
@ ON
Definition: wallet.h:236
CAccountingEntry::nOrderPos
int64_t nOrderPos
Definition: wallet.h:991
CWallet::HaveKey
bool HaveKey(const CKeyID &address) const
Check whether a key corresponding to a given address is present in the store.
Definition: wallet.cpp:6932
CAddressBookData::destdata
StringMap destdata
Definition: wallet.h:160
CHDChain
Definition: hdchain.h:11
CompactTallyItem::vecTxIn
std::vector< CTxIn > vecTxIn
Definition: wallet.h:118
CWalletTx::GetChange
CAmount GetChange() const
Definition: wallet.cpp:6346
main.h
CWallet::setKeyPool
std::set< int64_t > setKeyPool
Definition: wallet.h:307
CWallet::CreateCommitmentWithZeroBlind
static bool CreateCommitmentWithZeroBlind(const CAmount val, unsigned char *pBlind, std::vector< unsigned char > &commitment)
Definition: wallet.cpp:3102
nReserveBalance
int64_t nReserveBalance
Definition: wallet.cpp:59
CStealthAccount::viewAccount
CAccount viewAccount
Definition: wallet.h:199
CWallet::MultiSend
bool MultiSend()
Definition: wallet.cpp:5822
CWalletTx::WriteToDisk
bool WriteToDisk(CWalletDB *pwalletdb)
Definition: wallet.cpp:1761
key
CKey key
Definition: bip38tooldialog.cpp:173
CWallet
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,...
Definition: wallet.h:243
CWallet::ReturnKey
void ReturnKey(int64_t nIndex)
Definition: wallet.cpp:4819
CWalletTx
A transaction with a bunch of additional info that only the owner cares about.
Definition: wallet.h:792
CWallet::NotifyTransactionChanged
boost::signals2::signal< void(CWallet *wallet, const uint256 &hashTx, ChangeType status)> NotifyTransactionChanged
Wallet transaction added, removed or updated.
Definition: wallet.h:607
CWallet::SetNull
void SetNull()
Definition: wallet.cpp:6108
CWallet::GetPubKey
bool GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const
GetPubKey implementation that also checks the mapHdPubKeys.
Definition: wallet.cpp:6894
CWallet::RescanAfterUnlock
bool RescanAfterUnlock(int fromHeight)
Definition: wallet.cpp:499
COutputEntry::amount
CAmount amount
Definition: wallet.h:726
CWallet::ZapWalletTx
DBErrors ZapWalletTx(std::vector< CWalletTx > &vWtx)
Definition: wallet.cpp:4567
CReserveKey::ReturnKey
void ReturnKey()
Definition: wallet.cpp:5016
CWalletTx::fCreditCached
bool fCreditCached
Definition: wallet.h:810
i64tostr
std::string i64tostr(int64_t n)
Definition: utilstrencodings.cpp:559
CMerkleTx::GetTransactionLockSignatures
int GetTransactionLockSignatures() const
Definition: wallet.cpp:6054
CWallet::mapKeyMetadata
std::map< CKeyID, CKeyMetadata > mapKeyMetadata
Definition: wallet.h:308
CWallet::pwalletdbEncryption
CWalletDB * pwalletdbEncryption
Definition: wallet.h:249
CMerkleTx::IsInMainChain
bool IsInMainChain() const
Definition: wallet.cpp:6033
fTxDeleteEnabled
bool fTxDeleteEnabled
Definition: wallet.cpp:60
WalletFeature
WalletFeature
(client) version numbers for particular wallet features
Definition: wallet.h:100
CWallet::GetSeedPhrase
bool GetSeedPhrase(std::string &phrase)
Definition: wallet.cpp:351
CMerkleTx::IsTransactionLockTimedOut
bool IsTransactionLockTimedOut() const
Definition: wallet.cpp:6068
CWallet::nHashInterval
unsigned int nHashInterval
Definition: wallet.h:316
CWallet::cs_wallet
RecursiveMutex cs_wallet
Definition: wallet.h:301
CDataStream
Double ended buffer combining vector and stream-like interfaces.
Definition: streams.h:34
CWallet::findMyOutPoint
COutPoint findMyOutPoint(const CTxIn &txin) const
Definition: wallet.cpp:1348
CWallet::MaxTxSizePerTx
static int MaxTxSizePerTx()
Definition: wallet.cpp:5818
CWalletTx::IsTrusted
bool IsTrusted() const
Definition: wallet.cpp:6295
CWalletTx::nWatchDebitCached
CAmount nWatchDebitCached
Definition: wallet.h:823
CWalletKey::nTimeExpires
int64_t nTimeExpires
Definition: wallet.h:953
CWallet::dirtyCachedBalance
CAmount dirtyCachedBalance
Definition: wallet.h:379
CWallet::LoadKeyMetadata
bool LoadKeyMetadata(const CPubKey &pubkey, const CKeyMetadata &metadata)
Load metadata (used by LoadWallet)
Definition: wallet.cpp:430
pwalletMain
CWallet * pwalletMain
Definition: wallet.cpp:49
base58.h
CWalletTx::MarkDirty
void MarkDirty()
make sure balances are recalculated
Definition: wallet.cpp:6328
CWallet::Read2FASecret
std::string Read2FASecret()
Definition: wallet.cpp:388
CWallet::setLockedCoins
std::set< COutPoint > setLockedCoins
Definition: wallet.h:360
CWallet::combineMode
CombineMode combineMode
Definition: wallet.h:365
CReserveKey::CReserveKey
CReserveKey(CWallet *pwalletIn)
Definition: wallet.h:687
CWallet::UpdatedTransaction
bool UpdatedTransaction(const uint256 &hashTx)
Definition: wallet.cpp:5043
OFF
@ OFF
Definition: wallet.h:235
CMerkleTx::hashBlock
uint256 hashBlock
Definition: wallet.h:737
COutput::i
int i
Definition: wallet.h:926
CWallet::GetKeyPoolSize
unsigned int GetKeyPoolSize()
Definition: wallet.cpp:6232
CAccount::nAccountIndex
uint32_t nAccountIndex
Definition: wallet.h:171
CWallet::AddWatchOnly
bool AddWatchOnly(const CScript &dest)
Adds a watch-only address to the store, and saves it to disk.
Definition: wallet.cpp:469
walletdb.h
CWallet::SyncMetaData
void SyncMetaData(std::pair< TxSpends::iterator, TxSpends::iterator >)
Definition: wallet.cpp:777
COutPoint
An outpoint - a combination of a transaction hash and an index n into its vout.
Definition: transaction.h:36
CWallet::GetSpendDepth
unsigned int GetSpendDepth(const uint256 &hash, unsigned int n) const
Definition: wallet.cpp:885
CWallet::GetDecryptedHDChain
bool GetDecryptedHDChain(CHDChain &hdChainRet)
Definition: wallet.cpp:295
CTransaction::nVersion
const int32_t nVersion
Definition: transaction.h:284
CWallet::EraseDestData
bool EraseDestData(const CTxDestination &dest, const std::string &key)
Erases a destination data tuple in the store and on disk.
Definition: wallet.cpp:5237
CWallet::ReacceptWalletTransactions
void ReacceptWalletTransactions()
Definition: wallet.cpp:2132
CWalletTx::GetRequestCount
int GetRequestCount() const
Definition: wallet.cpp:1445
CMerkleTx::IsInMainChainImmature
bool IsInMainChainImmature() const
Definition: wallet.cpp:6038
CWallet::WriteStakingStatus
bool WriteStakingStatus(bool status)
Definition: wallet.cpp:366
CAccountingEntry::nEntryNo
uint64_t nEntryNo
position in ordered transaction list
Definition: wallet.h:992
wallet_ismine.h
CWallet::ChangeWalletPassphrase
bool ChangeWalletPassphrase(const SecureString &strOldWalletPassphrase, const SecureString &strNewWalletPassphrase)
Definition: wallet.cpp:656
CMutableTransaction
A mutable version of CTransaction.
Definition: transaction.h:384
CBlockLocator
Describes a place in the block chain to another node such that if the other node doesn't have the sam...
Definition: block.h:249
CWalletTx::GetAccountAmounts
void GetAccountAmounts(const std::string &strAccount, CAmount &nReceived, CAmount &nSent, CAmount &nFee, const isminefilter &filter) const
Definition: wallet.cpp:1731
CWalletKey::ADD_SERIALIZE_METHODS
ADD_SERIALIZE_METHODS
Definition: wallet.h:960
CWalletTx::nImmatureWatchCreditCached
CAmount nImmatureWatchCreditCached
Definition: wallet.h:825
CWallet::fMultiSendStake
bool fMultiSendStake
Definition: wallet.h:323
CWallet::EraseFromWallet
bool EraseFromWallet(const uint256 &hash)
Definition: wallet.cpp:1320
CAddressBookData::name
std::string name
Definition: wallet.h:151
CWallet::Read2FA
bool Read2FA()
Definition: wallet.cpp:379
CBlockIndex
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: chain.h:162
CWalletTx::GetConflicts
std::set< uint256 > GetConflicts() const
Definition: wallet.cpp:2188
CDataStream::str
std::string str() const
Definition: streams.h:107
CWallet::ListLockedCoins
void ListLockedCoins(std::vector< COutPoint > &vOutpts)
Definition: wallet.cpp:5083
CWallet::RemoveWatchOnly
bool RemoveWatchOnly(const CScript &dest)
Definition: wallet.cpp:480
CWalletTx::fFromMe
char fFromMe
Definition: wallet.h:803
CWallet::isMultiSendEnabled
bool isMultiSendEnabled()
Definition: wallet.cpp:6142
CWallet::strWalletFile
std::string strWalletFile
Definition: wallet.h:305
COutput
Definition: wallet.h:922
CWallet::GetKey
bool GetKey(const CKeyID &address, CKey &keyOut) const
GetKey implementation that can derive a HD private key on the fly.
Definition: wallet.cpp:6906
fTxConflictDeleteEnabled
bool fTxConflictDeleteEnabled
Definition: wallet.cpp:61
amount.h
CAccountingEntry::mapValue
mapValue_t mapValue
Definition: wallet.h:990
CWallet::EncodeTxOutAmount
bool EncodeTxOutAmount(CTxOut &out, const CAmount &amount, const unsigned char *sharedSec, bool isCoinstake=false)
Definition: wallet.cpp:7168
CWallet::CanSupportFeature
bool CanSupportFeature(enum WalletFeature wf)
check whether we are allowed to upgrade (or already support) to the named feature
Definition: wallet.cpp:6153
LIMITED_STRING
#define LIMITED_STRING(obj, n)
Definition: serialize.h:367
CWallet::Write2FAPeriod
bool Write2FAPeriod(int period)
Definition: wallet.cpp:393
CExtPubKey
Definition: pubkey.h:205
CWallet::CreatePrivacyAccount
void CreatePrivacyAccount(bool force=false)
Definition: wallet.cpp:4766
CWallet::nTimeFirstKey
int64_t nTimeFirstKey
Definition: wallet.h:363
CWallet::allMyPrivateKeys
bool allMyPrivateKeys(std::vector< CKey > &spends, std::vector< CKey > &views)
Definition: wallet.cpp:6809
CMerkleTx::Init
void Init()
Definition: wallet.h:750
CWallet::GenerateNewKey
CPubKey GenerateNewKey()
Definition: wallet.cpp:215
CWallet::LoadDestData
bool LoadDestData(const CTxDestination &dest, const std::string &key, const std::string &value)
Adds a destination data tuple to the store, without saving it to disk.
Definition: wallet.cpp:5246
CKeyMetadata
Definition: walletdb.h:45
CAddressBookData::StringMap
std::map< std::string, std::string > StringMap
Definition: wallet.h:159
CWalletTx::fDebitCached
bool fDebitCached
Definition: wallet.h:809
CWallet::AllMyPublicAddresses
bool AllMyPublicAddresses(std::vector< std::string > &addresses, std::vector< std::string > &accountNames)
Definition: wallet.cpp:6781
CWallet::getCTxOutValue
CAmount getCTxOutValue(const CTransaction &tx, const CTxOut &out) const
Definition: wallet.cpp:7202
CWallet::LoadCScript
bool LoadCScript(const CScript &redeemScript)
Definition: wallet.cpp:454
CWallet::mapAddressBook
std::map< CTxDestination, CAddressBookData > mapAddressBook
Definition: wallet.h:354
CWalletTx::fImmatureCreditCached
bool fImmatureCreditCached
Definition: wallet.h:811
CWallet::ParameterInteraction
static bool ParameterInteraction()
Definition: wallet.cpp:812
CWalletKey::SerializationOp
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
Definition: wallet.h:963
CWallet::GenerateIntegratedAddressWithRandomPaymentID
std::string GenerateIntegratedAddressWithRandomPaymentID(std::string accountName, uint64_t &paymentID)
Definition: wallet.cpp:6501
CWallet::Write2FA
bool Write2FA(bool status)
Definition: wallet.cpp:375
CWallet::myViewPrivateKey
bool myViewPrivateKey(CKey &view) const
Definition: wallet.cpp:7025
CAccountingEntry::SerializationOp
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
Definition: wallet.h:1013
CWalletTx::ADD_SERIALIZE_METHODS
ADD_SERIALIZE_METHODS
Definition: wallet.h:836
STAKABLE_COINS
@ STAKABLE_COINS
Definition: wallet.h:112
CWallet::fMultiSendMasternodeReward
bool fMultiSendMasternodeReward
Definition: wallet.h:324
CWallet::walletUnlockCountStatus
int walletUnlockCountStatus
Definition: wallet.h:319
CWalletTx::IsFromMe
bool IsFromMe(const isminefilter &filter) const
Definition: wallet.cpp:6355
CWallet::ReadAutoConsolidateSettingTime
uint32_t ReadAutoConsolidateSettingTime()
Definition: wallet.cpp:3161
FEATURE_WALLETCRYPT
@ FEATURE_WALLETCRYPT
Definition: wallet.h:103
CWallet::ReadAccountList
bool ReadAccountList(std::string &accountList)
Definition: wallet.cpp:6369
CWalletTx::GetImmatureWatchOnlyCredit
CAmount GetImmatureWatchOnlyCredit(const bool &fUseCache=true) const
Definition: wallet.cpp:1642
CWallet::SelectStakeCoins
bool SelectStakeCoins(std::list< std::unique_ptr< CStakeInput > > &listInputs, CAmount nTargetAmount)
Definition: wallet.cpp:2629
CWallet::UnlockAllCoins
void UnlockAllCoins()
Definition: wallet.cpp:5069
CWalletTx::GetAvailableCredit
CAmount GetAvailableCredit(bool fUseCache=true) const
Definition: wallet.cpp:1547
CAccountingEntry::strComment
std::string strComment
Definition: wallet.h:989