qt: Move transaction notification to transaction table model
Move transaction new/update notification to TransactionTableModel. This moves the concerns to where they're actually handled. No need to bounce this through wallet model. - Do wallet transaction preprocessing on signal handler side; avoids locking cs_main/cs_wallet on notification in GUI thread (except for new transactions)
This commit is contained in:
@@ -133,7 +133,6 @@ public:
|
||||
CAmount getWatchUnconfirmedBalance() const;
|
||||
CAmount getWatchImmatureBalance() const;
|
||||
EncryptionStatus getEncryptionStatus() const;
|
||||
bool processingQueuedTransactions() { return fProcessingQueuedTransactions; }
|
||||
|
||||
// Check address for validity
|
||||
bool validateAddress(const QString &address);
|
||||
@@ -197,7 +196,6 @@ public:
|
||||
|
||||
private:
|
||||
CWallet *wallet;
|
||||
bool fProcessingQueuedTransactions;
|
||||
bool fHaveWatchOnly;
|
||||
bool fForceCheckBalanceChanged;
|
||||
|
||||
@@ -254,15 +252,13 @@ public slots:
|
||||
/* Wallet status might have changed */
|
||||
void updateStatus();
|
||||
/* New transaction, or transaction changed status */
|
||||
void updateTransaction(const QString &hash, int status);
|
||||
void updateTransaction();
|
||||
/* New, updated or removed address book entry */
|
||||
void updateAddressBook(const QString &address, const QString &label, bool isMine, const QString &purpose, int status);
|
||||
/* Watch-only added */
|
||||
void updateWatchOnlyFlag(bool fHaveWatchonly);
|
||||
/* Current, immature or unconfirmed balance might have changed - emit 'balanceChanged' if so */
|
||||
void pollBalanceChanged();
|
||||
/* Needed to update fProcessingQueuedTransactions through a QueuedConnection */
|
||||
void setProcessingQueuedTransactions(bool value) { fProcessingQueuedTransactions = value; }
|
||||
};
|
||||
|
||||
#endif // WALLETMODEL_H
|
||||
|
||||
Reference in New Issue
Block a user