Feathercoin  0.5.0
P2P Digital Currency
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
walletmodel.cpp
Go to the documentation of this file.
1 #include "walletmodel.h"
2 #include "guiconstants.h"
3 #include "optionsmodel.h"
4 #include "addresstablemodel.h"
6 
7 #include "ui_interface.h"
8 #include "wallet.h"
9 #include "walletdb.h" // for BackupWallet
10 #include "base58.h"
11 #include "init.h"
12 #include <QSet>
13 #include <QTimer>
14 
15 WalletModel::WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *parent) :
16  QObject(parent), wallet(wallet), optionsModel(optionsModel), addressTableModel(0),
17  transactionTableModel(0),
18  cachedBalance(0), cachedUnconfirmedBalance(0), cachedImmatureBalance(0),
19  cachedNumTransactions(0),
20  cachedEncryptionStatus(Unencrypted),
21  cachedNumBlocks(0)
22 {
23  addressTableModel = new AddressTableModel(wallet, this);
24  transactionTableModel = new TransactionTableModel(wallet, this);
25 
26  // This timer will be fired repeatedly to update the balance
27  pollTimer = new QTimer(this);
28  connect(pollTimer, SIGNAL(timeout()), this, SLOT(pollBalanceChanged()));
29  pollTimer->start(MODEL_UPDATE_DELAY);
30 
32 }
33 
35 {
37 }
38 
39 qint64 WalletModel::getBalance(const CCoinControl *coinControl) const
40 {
41  if (coinControl)
42  {
43  int64 nBalance = 0;
44  std::vector<COutput> vCoins;
45  wallet->AvailableCoins(vCoins, true, coinControl);
46  BOOST_FOREACH(const COutput& out, vCoins)
47  nBalance += out.tx->vout[out.i].nValue;
48 
49  return nBalance;
50  }
51 
52  return wallet->GetBalance();
53 }
54 
56 {
57  return wallet->GetUnconfirmedBalance();
58 }
59 
61 {
62  return wallet->GetImmatureBalance();
63 }
64 
66 {
67  int numTransactions = 0;
68  {
70  // the size of mapWallet contains the number of unique transaction IDs
71  // (e.g. payments to yourself generate 2 transactions, but both share the same transaction ID)
72  numTransactions = wallet->mapWallet.size();
73  }
74  return numTransactions;
75 }
76 
78 {
79  EncryptionStatus newEncryptionStatus = getEncryptionStatus();
80 
81  if(cachedEncryptionStatus != newEncryptionStatus)
82  emit encryptionStatusChanged(newEncryptionStatus);
83 }
84 
86 {
88  {
89  // Balance and number of transactions might have changed
92  }
93 }
94 
96 {
97  qint64 newBalance = getBalance();
98  qint64 newUnconfirmedBalance = getUnconfirmedBalance();
99  qint64 newImmatureBalance = getImmatureBalance();
100 
101  if(cachedBalance != newBalance || cachedUnconfirmedBalance != newUnconfirmedBalance || cachedImmatureBalance != newImmatureBalance)
102  {
103  cachedBalance = newBalance;
104  cachedUnconfirmedBalance = newUnconfirmedBalance;
105  cachedImmatureBalance = newImmatureBalance;
106  emit balanceChanged(newBalance, newUnconfirmedBalance, newImmatureBalance);
107  }
108 }
109 
110 void WalletModel::updateTransaction(const QString &hash, int status)
111 {
114 
115  // Balance and number of transactions might have changed
117 
118  int newNumTransactions = getNumTransactions();
119  if(cachedNumTransactions != newNumTransactions)
120  {
121  cachedNumTransactions = newNumTransactions;
122  emit numTransactionsChanged(newNumTransactions);
123  }
124 }
125 
126 void WalletModel::updateAddressBook(const QString &address, const QString &label, bool isMine, int status)
127 {
129  addressTableModel->updateEntry(address, label, isMine, status);
130 }
131 
132 bool WalletModel::validateAddress(const QString &address)
133 {
134  CBitcoinAddress addressParsed(address.toStdString());
135  return addressParsed.IsValid();
136 }
137 
138 bool WalletModel::importPrivateKey(QString privKey)
139 {
140  CBitcoinSecret vchSecret;
141  bool fGood = vchSecret.SetString(privKey.toStdString());
142  if (!fGood)
143  return false;
144  CKey key = vchSecret.GetKey();
145  CPubKey pubkey = key.GetPubKey();
146  CKeyID vchAddress = pubkey.GetID();
147  {
150  pwalletMain->SetAddressBookName(vchAddress, ("imported wallet"));
151  if (!pwalletMain->AddKeyPubKey(key, pubkey))
152  return false;
155  printf("importing walling with public key %s\n", vchAddress.ToString().c_str());
156  }
157  return true;
158 }
159 
160 WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList<SendCoinsRecipient> &recipients, const CCoinControl *coinControl)
161 {
162  qint64 total = 0;
163  QSet<QString> setAddress;
164  QString hex;
165 
166  if(recipients.empty())
167  {
168  return OK;
169  }
170 
171  // Pre-check input data for validity
172  foreach(const SendCoinsRecipient &rcp, recipients)
173  {
174  if(!validateAddress(rcp.address))
175  {
176  return InvalidAddress;
177  }
178  setAddress.insert(rcp.address);
179 
180  if(rcp.amount <= 0)
181  {
182  return InvalidAmount;
183  }
184  total += rcp.amount;
185  }
186 
187  if(recipients.size() > setAddress.size())
188  {
189  return DuplicateAddress;
190  }
191 
192  int64 nBalance = getBalance(coinControl);
193 
194  if(total > nBalance)
195  {
196  return AmountExceedsBalance;
197  }
198 
199  if((total + nTransactionFee) > nBalance)
200  {
202  }
203 
204  {
206 
207  // Sendmany
208  std::vector<std::pair<CScript, int64> > vecSend;
209  foreach(const SendCoinsRecipient &rcp, recipients)
210  {
211  CScript scriptPubKey;
212  scriptPubKey.SetDestination(CBitcoinAddress(rcp.address.toStdString()).Get());
213  vecSend.push_back(make_pair(scriptPubKey, rcp.amount));
214  }
215 
216  CWalletTx wtx;
217  CReserveKey keyChange(wallet);
218  int64 nFeeRequired = 0;
219  std::string strFailReason;
220  bool fCreated = wallet->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired, strFailReason, coinControl);
221 
222  if(!fCreated)
223  {
224  if((total + nFeeRequired) > nBalance)
225  {
226  return SendCoinsReturn(AmountWithFeeExceedsBalance, nFeeRequired);
227  }
228  emit message(tr("Send Coins"), QString::fromStdString(strFailReason),
231  }
232  if(!uiInterface.ThreadSafeAskFee(nFeeRequired))
233  {
234  return Aborted;
235  }
236  if(!wallet->CommitTransaction(wtx, keyChange))
237  {
239  }
240  hex = QString::fromStdString(wtx.GetHash().GetHex());
241  }
242 
243  // Add addresses / update labels that we've sent to to the address book
244  foreach(const SendCoinsRecipient &rcp, recipients)
245  {
246  std::string strAddress = rcp.address.toStdString();
247  CTxDestination dest = CBitcoinAddress(strAddress).Get();
248  std::string strLabel = rcp.label.toStdString();
249  {
251 
252  std::map<CTxDestination, std::string>::iterator mi = wallet->mapAddressBook.find(dest);
253 
254  // Check if we have a new address or an updated label
255  if (mi == wallet->mapAddressBook.end() || mi->second != strLabel)
256  {
257  wallet->SetAddressBookName(dest, strLabel);
258  }
259  }
260  }
261 
262  return SendCoinsReturn(OK, 0, hex);
263 }
264 
266 {
267  return optionsModel;
268 }
269 
271 {
272  return addressTableModel;
273 }
274 
276 {
277  return transactionTableModel;
278 }
279 
281 {
282  if(!wallet->IsCrypted())
283  {
284  return Unencrypted;
285  }
286  else if(wallet->IsLocked())
287  {
288  return Locked;
289  }
290  else
291  {
292  return Unlocked;
293  }
294 }
295 
296 bool WalletModel::setWalletEncrypted(bool encrypted, const SecureString &passphrase)
297 {
298  if(encrypted)
299  {
300  // Encrypt
301  return wallet->EncryptWallet(passphrase);
302  }
303  else
304  {
305  // Decrypt -- TODO; not supported yet
306  return false;
307  }
308 }
309 
310 bool WalletModel::setWalletLocked(bool locked, const SecureString &passPhrase)
311 {
312  if(locked)
313  {
314  // Lock
315  return wallet->Lock();
316  }
317  else
318  {
319  // Unlock
320  return wallet->Unlock(passPhrase);
321  }
322 }
323 
324 bool WalletModel::changePassphrase(const SecureString &oldPass, const SecureString &newPass)
325 {
326  bool retval;
327  {
329  wallet->Lock(); // Make sure wallet is locked before attempting pass change
330  retval = wallet->ChangeWalletPassphrase(oldPass, newPass);
331  }
332  return retval;
333 }
334 
335 bool WalletModel::backupWallet(const QString &filename)
336 {
337  return BackupWallet(*wallet, filename.toLocal8Bit().data());
338 }
339 
340 // Handlers for core signals
341 static void NotifyKeyStoreStatusChanged(WalletModel *walletmodel, CCryptoKeyStore *wallet)
342 {
343  OutputDebugStringF("NotifyKeyStoreStatusChanged\n");
344  QMetaObject::invokeMethod(walletmodel, "updateStatus", Qt::QueuedConnection);
345 }
346 
347 static void NotifyAddressBookChanged(WalletModel *walletmodel, CWallet *wallet, const CTxDestination &address, const std::string &label, bool isMine, ChangeType status)
348 {
349  OutputDebugStringF("NotifyAddressBookChanged %s %s isMine=%i status=%i\n", CBitcoinAddress(address).ToString().c_str(), label.c_str(), isMine, status);
350  QMetaObject::invokeMethod(walletmodel, "updateAddressBook", Qt::QueuedConnection,
351  Q_ARG(QString, QString::fromStdString(CBitcoinAddress(address).ToString())),
352  Q_ARG(QString, QString::fromStdString(label)),
353  Q_ARG(bool, isMine),
354  Q_ARG(int, status));
355 }
356 
357 static void NotifyTransactionChanged(WalletModel *walletmodel, CWallet *wallet, const uint256 &hash, ChangeType status)
358 {
359  OutputDebugStringF("NotifyTransactionChanged %s status=%i\n", hash.GetHex().c_str(), status);
360  QMetaObject::invokeMethod(walletmodel, "updateTransaction", Qt::QueuedConnection,
361  Q_ARG(QString, QString::fromStdString(hash.GetHex())),
362  Q_ARG(int, status));
363 }
364 
366 {
367  // Connect signals to wallet
368  wallet->NotifyStatusChanged.connect(boost::bind(&NotifyKeyStoreStatusChanged, this, _1));
369  wallet->NotifyAddressBookChanged.connect(boost::bind(NotifyAddressBookChanged, this, _1, _2, _3, _4, _5));
370  wallet->NotifyTransactionChanged.connect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
371 }
372 
374 {
375  // Disconnect signals from wallet
376  wallet->NotifyStatusChanged.disconnect(boost::bind(&NotifyKeyStoreStatusChanged, this, _1));
377  wallet->NotifyAddressBookChanged.disconnect(boost::bind(NotifyAddressBookChanged, this, _1, _2, _3, _4, _5));
378  wallet->NotifyTransactionChanged.disconnect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
379 }
380 
381 // WalletModel::UnlockContext implementation
383 {
384  bool was_locked = getEncryptionStatus() == Locked;
385  if(was_locked)
386  {
387  // Request UI to unlock wallet
388  emit requireUnlock();
389  }
390  // If wallet is still locked, unlock was failed or cancelled, mark context as invalid
391  bool valid = getEncryptionStatus() != Locked;
392 
393  return UnlockContext(this, valid, was_locked);
394 }
395 
396 WalletModel::UnlockContext::UnlockContext(WalletModel *wallet, bool valid, bool relock):
397  wallet(wallet),
398  valid(valid),
399  relock(relock)
400 {
401 }
402 
404 {
405  if(valid && relock)
406  {
407  wallet->setWalletLocked(true);
408  }
409 }
410 
412 {
413  // Transfer context; old object no longer relocks wallet
414  *this = rhs;
415  rhs.relock = false;
416 }
417 
418 bool WalletModel::getPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const
419 {
420  return wallet->GetPubKey(address, vchPubKeyOut);
421 }
422 
423 // returns a list of COutputs from COutPoints
424 void WalletModel::getOutputs(const std::vector<COutPoint>& vOutpoints, std::vector<COutput>& vOutputs)
425 {
426  BOOST_FOREACH(const COutPoint& outpoint, vOutpoints)
427  {
428  if (!wallet->mapWallet.count(outpoint.hash)) continue;
429  COutput out(&wallet->mapWallet[outpoint.hash], outpoint.n, wallet->mapWallet[outpoint.hash].GetDepthInMainChain());
430  vOutputs.push_back(out);
431  }
432 }
433 
434 // AvailableCoins + LockedCoins grouped by wallet address (put change in one group with wallet address)
435 void WalletModel::listCoins(std::map<QString, std::vector<COutput> >& mapCoins) const
436 {
437  std::vector<COutput> vCoins;
438  wallet->AvailableCoins(vCoins);
439 
440  std::vector<COutPoint> vLockedCoins;
441  wallet->ListLockedCoins(vLockedCoins);
442 
443  // add locked coins
444  BOOST_FOREACH(const COutPoint& outpoint, vLockedCoins)
445  {
446  if (!wallet->mapWallet.count(outpoint.hash)) continue;
447  COutput out(&wallet->mapWallet[outpoint.hash], outpoint.n, wallet->mapWallet[outpoint.hash].GetDepthInMainChain());
448  vCoins.push_back(out);
449  }
450 
451  BOOST_FOREACH(const COutput& out, vCoins)
452  {
453  COutput cout = out;
454 
455  while (wallet->IsChange(cout.tx->vout[cout.i]) && cout.tx->vin.size() > 0 && wallet->IsMine(cout.tx->vin[0]))
456  {
457  if (!wallet->mapWallet.count(cout.tx->vin[0].prevout.hash)) break;
458  cout = COutput(&wallet->mapWallet[cout.tx->vin[0].prevout.hash], cout.tx->vin[0].prevout.n, 0);
459  }
460 
461  CTxDestination address;
462  if(!ExtractDestination(cout.tx->vout[cout.i].scriptPubKey, address)) continue;
463  mapCoins[CBitcoinAddress(address).ToString().c_str()].push_back(out);
464  }
465 }
466 
467 bool WalletModel::isLockedCoin(uint256 hash, unsigned int n) const
468 {
469  return wallet->IsLockedCoin(hash, n);
470 }
471 
473 {
474  wallet->LockCoin(output);
475 }
476 
478 {
479  wallet->UnlockCoin(output);
480 }
481 
482 void WalletModel::listLockedCoins(std::vector<COutPoint>& vOutpts)
483 {
484  wallet->ListLockedCoins(vOutpts);
485 }
bool IsValid() const
Definition: base58.h:296
TransactionTableModel * transactionTableModel
Definition: walletmodel.h:140
bool IsCrypted() const
Definition: keystore.h:120
void getOutputs(const std::vector< COutPoint > &vOutpoints, std::vector< COutput > &vOutputs)
int i
Definition: wallet.h:700
bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey)
Definition: wallet.cpp:49
void lockCoin(COutPoint &output)
SendCoinsReturn sendCoins(const QList< SendCoinsRecipient > &recipients, const CCoinControl *coinControl=NULL)
bool IsMine(const CTxIn &txin) const
Definition: wallet.cpp:540
qint64 getImmatureBalance() const
Definition: walletmodel.cpp:60
qint64 cachedImmatureBalance
Definition: walletmodel.h:145
CKey GetKey()
Definition: base58.h:415
void ListLockedCoins(std::vector< COutPoint > &vOutpts)
Definition: wallet.cpp:1903
CCriticalSection cs_wallet
Definition: wallet.h:83
int64 GetUnconfirmedBalance() const
Definition: wallet.cpp:938
qint64 cachedNumTransactions
Definition: walletmodel.h:146
qint64 cachedUnconfirmedBalance
Definition: walletmodel.h:144
UnlockContext requestUnlock()
void unsubscribeFromCoreSignals()
bool isLockedCoin(uint256 hash, unsigned int n) const
CCriticalSection cs_main
Definition: main.cpp:32
bool backupWallet(const QString &filename)
uint256 GetHash() const
Definition: main.h:515
bool IsLocked() const
Definition: keystore.h:125
int total
Definition: db_bench.cc:272
void updateTransaction(const QString &hash, int status)
unsigned int n
Definition: main.h:282
AddressTableModel * getAddressTableModel()
Keystore which keeps the private keys encrypted.
Definition: keystore.h:96
void updateEntry(const QString &address, const QString &label, bool isMine, int status)
CTxDestination Get() const
Definition: base58.h:345
void ReacceptWalletTransactions()
Definition: wallet.cpp:796
bool GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const
Definition: keystore.cpp:166
Coin Control Features.
Definition: coincontrol.h:5
int64 nTransactionFee
Definition: main.cpp:84
void updateStatus()
Definition: walletmodel.cpp:77
bool SetAddressBookName(const CTxDestination &address, const std::string &strName)
Definition: wallet.cpp:1463
void MarkDirty()
Definition: wallet.cpp:365
bool SetString(const char *pszSecret)
Definition: base58.h:440
UnlockContext(WalletModel *wallet, bool valid, bool relock)
void SetDestination(const CTxDestination &address)
Definition: script.cpp:1768
void balanceChanged(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance)
boost::signals2::signal< void(CWallet *wallet, const uint256 &hashTx, ChangeType status)> NotifyTransactionChanged
Wallet transaction added, removed or updated.
Definition: wallet.h:314
WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *parent=0)
Definition: walletmodel.cpp:15
boost::signals2::signal< void(CCryptoKeyStore *wallet)> NotifyStatusChanged
Definition: keystore.h:172
void checkBalanceChanged()
Definition: walletmodel.cpp:95
#define LOCK2(cs1, cs2)
Definition: sync.h:109
CWallet * wallet
Definition: walletmodel.h:133
void numTransactionsChanged(int count)
void LockCoin(COutPoint &output)
Definition: wallet.cpp:1881
bool ChangeWalletPassphrase(const SecureString &strOldWalletPassphrase, const SecureString &strNewWalletPassphrase)
Definition: wallet.cpp:114
ChangeType
General change type (added, updated, removed).
Definition: ui_interface.h:18
#define printf
Definition: rpcdump.cpp:12
CPubKey GetPubKey() const
Definition: key.cpp:312
#define LOCK(cs)
Definition: sync.h:108
bool changePassphrase(const SecureString &oldPass, const SecureString &newPass)
A base58-encoded secret key.
Definition: base58.h:398
std::vector< CTxOut > vout
Definition: main.h:485
void UnlockCoin(COutPoint &output)
Definition: wallet.cpp:1886
std::basic_string< char, std::char_traits< char >, secure_allocator< char > > SecureString
Definition: allocators.h:269
qint64 getUnconfirmedBalance() const
Definition: walletmodel.cpp:55
int64 GetImmatureBalance() const
Definition: wallet.cpp:953
An encapsulated public key.
Definition: key.h:40
std::vector< CTxIn > vin
Definition: main.h:484
bool getPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const
CClientUIInterface uiInterface
Definition: init.cpp:32
void updateAddressBook(const QString &address, const QString &label, bool isMine, int status)
CWallet * pwalletMain
Definition: init.cpp:31
boost::signals2::signal< bool(int64 nFeeRequired), boost::signals2::last_value< bool > > ThreadSafeAskFee
Ask the user whether they want to pay a fee or not.
Definition: ui_interface.h:74
bool CommitTransaction(CWalletTx &wtxNew, CReserveKey &reservekey)
Definition: wallet.cpp:1338
std::string ToString() const
Definition: base58.h:229
OptionsModel * optionsModel
Definition: walletmodel.h:137
TransactionTableModel * getTransactionTableModel()
void AvailableCoins(std::vector< COutput > &vCoins, bool fOnlyConfirmed=true, const CCoinControl *coinControl=NULL) const
Definition: wallet.cpp:968
EncryptionStatus cachedEncryptionStatus
Definition: walletmodel.h:147
An outpoint - a combination of a transaction hash and an index n into its vout.
Definition: main.h:278
int64 GetBalance() const
Definition: wallet.cpp:922
void CopyFrom(const UnlockContext &rhs)
std::string GetHex() const
Definition: uint256.h:298
UI model for the transaction table of a wallet.
int OutputDebugStringF(const char *pszFormat,...)
Definition: util.cpp:237
Qt model of the address book in the core.
bool setWalletLocked(bool locked, const SecureString &passPhrase=SecureString())
A transaction with a bunch of additional info that only the owner cares about.
Definition: wallet.h:367
void encryptionStatusChanged(int status)
QTimer * pollTimer
Definition: walletmodel.h:150
EncryptionStatus getEncryptionStatus() const
bool validateAddress(const QString &address)
256-bit unsigned integer
Definition: uint256.h:537
int cachedNumBlocks
Definition: walletmodel.h:148
CBlockIndex * pindexGenesisBlock
Definition: main.cpp:40
void requireUnlock()
int ScanForWalletTransactions(CBlockIndex *pindexStart, bool fUpdate=false)
Definition: wallet.cpp:774
bool EncryptWallet(const SecureString &strWalletPassphrase)
Definition: wallet.cpp:222
bool importPrivateKey(QString privKey)
void listLockedCoins(std::vector< COutPoint > &vOutpts)
A key allocated from the key pool.
Definition: wallet.h:318
Interface from Qt to configuration data structure for Bitcoin client.
Definition: optionsmodel.h:12
Serialized script, used inside transaction inputs and outputs.
Definition: script.h:244
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:36
std::string ToString() const
Definition: uint256.h:343
bool setWalletEncrypted(bool encrypted, const SecureString &passphrase)
void unlockCoin(COutPoint &output)
void message(const QString &title, const QString &message, unsigned int style)
A reference to a CKey: the Hash160 of its serialized public key.
Definition: key.h:24
qint64 getBalance(const CCoinControl *coinControl=NULL) const
Definition: walletmodel.cpp:39
bool ExtractDestination(const CScript &scriptPubKey, CTxDestination &addressRet)
Definition: script.cpp:1422
const CWalletTx * tx
Definition: wallet.h:699
bool Unlock(const SecureString &strWalletPassphrase)
Definition: wallet.cpp:91
void updateTransaction(const QString &hash, int status)
bool IsChange(const CTxOut &txout) const
Definition: wallet.cpp:572
int getNumTransactions() const
Definition: walletmodel.cpp:65
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
Definition: wallet.h:69
bool BackupWallet(const CWallet &wallet, const std::string &strDest)
std::map< CTxDestination, std::string > mapAddressBook
Definition: wallet.h:119
std::map< uint256, CWalletTx > mapWallet
Definition: wallet.h:115
boost::signals2::signal< void(CWallet *wallet, const CTxDestination &address, const std::string &label, bool isMine, ChangeType status)> NotifyAddressBookChanged
Address book entry changed.
Definition: wallet.h:309
AddressTableModel * addressTableModel
Definition: walletmodel.h:139
qint64 cachedBalance
Definition: walletmodel.h:143
boost::variant< CNoDestination, CKeyID, CScriptID > CTxDestination
A txout script template with a specific destination.
Definition: script.h:62
An encapsulated private key.
Definition: key.h:172
int nBestHeight
Definition: main.cpp:41
void listCoins(std::map< QString, std::vector< COutput > > &mapCoins) const
CKeyID GetID() const
Definition: key.h:129
bool IsLockedCoin(uint256 hash, unsigned int n) const
Definition: wallet.cpp:1896
uint32_t hash
Definition: cache.cc:34
bool CreateTransaction(const std::vector< std::pair< CScript, int64 > > &vecSend, CWalletTx &wtxNew, CReserveKey &reservekey, int64 &nFeeRet, std::string &strFailReason, const CCoinControl *coinControl=NULL)
void pollBalanceChanged()
Definition: walletmodel.cpp:85
OptionsModel * getOptionsModel()
void subscribeToCoreSignals()
uint256 hash
Definition: main.h:281
long long int64
Definition: serialize.h:25