Add a timer to check for changes in immature or unconfirmed balances,
when these are non-zero. Fixed a minor mem leak.
This commit is contained in:
@@ -10,6 +10,10 @@ class AddressTableModel;
|
||||
class TransactionTableModel;
|
||||
class CWallet;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QTimer;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class SendCoinsRecipient
|
||||
{
|
||||
public:
|
||||
@@ -120,9 +124,14 @@ private:
|
||||
qint64 cachedImmatureBalance;
|
||||
qint64 cachedNumTransactions;
|
||||
EncryptionStatus cachedEncryptionStatus;
|
||||
int cachedNumBlocks;
|
||||
|
||||
QTimer *pollTimer;
|
||||
|
||||
void subscribeToCoreSignals();
|
||||
void unsubscribeFromCoreSignals();
|
||||
void checkBalanceChanged();
|
||||
|
||||
signals:
|
||||
// Signal that balance in wallet changed
|
||||
void balanceChanged(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance);
|
||||
@@ -148,6 +157,8 @@ public slots:
|
||||
void updateTransaction(const QString &hash, int status);
|
||||
/* New, updated or removed address book entry */
|
||||
void updateAddressBook(const QString &address, const QString &label, bool isMine, int status);
|
||||
/* Current, immature or unconfirmed balance might have changed - emit 'balanceChanged' if so */
|
||||
void pollBalanceChanged();
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user