|
|
|
@ -31,7 +31,6 @@ WalletModel::WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *p
@@ -31,7 +31,6 @@ WalletModel::WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *p
|
|
|
|
|
transactionTableModel(0), |
|
|
|
|
recentRequestsTableModel(0), |
|
|
|
|
cachedBalance(0), cachedUnconfirmedBalance(0), cachedImmatureBalance(0), |
|
|
|
|
cachedNumTransactions(0), |
|
|
|
|
cachedEncryptionStatus(Unencrypted), |
|
|
|
|
cachedNumBlocks(0) |
|
|
|
|
{ |
|
|
|
@ -96,18 +95,6 @@ qint64 WalletModel::getWatchImmatureBalance() const
@@ -96,18 +95,6 @@ qint64 WalletModel::getWatchImmatureBalance() const
|
|
|
|
|
return wallet->GetImmatureWatchOnlyBalance(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int WalletModel::getNumTransactions() const |
|
|
|
|
{ |
|
|
|
|
int numTransactions = 0; |
|
|
|
|
{ |
|
|
|
|
LOCK(wallet->cs_wallet); |
|
|
|
|
// the size of mapWallet contains the number of unique transaction IDs
|
|
|
|
|
// (e.g. payments to yourself generate 2 transactions, but both share the same transaction ID)
|
|
|
|
|
numTransactions = wallet->mapWallet.size(); |
|
|
|
|
} |
|
|
|
|
return numTransactions; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void WalletModel::updateStatus() |
|
|
|
|
{ |
|
|
|
|
EncryptionStatus newEncryptionStatus = getEncryptionStatus(); |
|
|
|
@ -169,13 +156,6 @@ void WalletModel::updateTransaction(const QString &hash, int status)
@@ -169,13 +156,6 @@ void WalletModel::updateTransaction(const QString &hash, int status)
|
|
|
|
|
|
|
|
|
|
// Balance and number of transactions might have changed
|
|
|
|
|
checkBalanceChanged(); |
|
|
|
|
|
|
|
|
|
int newNumTransactions = getNumTransactions(); |
|
|
|
|
if(cachedNumTransactions != newNumTransactions) |
|
|
|
|
{ |
|
|
|
|
cachedNumTransactions = newNumTransactions; |
|
|
|
|
emit numTransactionsChanged(newNumTransactions); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void WalletModel::updateAddressBook(const QString &address, const QString &label, |
|
|
|
|