diff options
| author | Russell Yanofsky <[email protected]> | 2020-04-24 17:40:33 -0400 |
|---|---|---|
| committer | Russell Yanofsky <[email protected]> | 2020-05-01 06:59:09 -0400 |
| commit | 83f69fab3a1ae97c5cff8ba1e6fd191b0fa264bb (patch) | |
| tree | fbbbed9146b8baabc077896cbafdd28b91624fe3 | |
| parent | Merge #16426: Reverse cs_main, cs_wallet lock order and reduce cs_main locking (diff) | |
| download | discoin-83f69fab3a1ae97c5cff8ba1e6fd191b0fa264bb.tar.xz discoin-83f69fab3a1ae97c5cff8ba1e6fd191b0fa264bb.zip | |
Switch transaction table to use wallet height not node height
Tweak of #17905 to make gui display of transactions and balances more
consistent. This change shouldn't cause visible effects in normal cases, just
make GUI wallet code more internally correct and consistent.
| -rw-r--r-- | src/qt/transactiontablemodel.cpp | 2 | ||||
| -rw-r--r-- | src/qt/walletmodel.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 18554aef1..7a1550322 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -664,7 +664,7 @@ QVariant TransactionTableModel::headerData(int section, Qt::Orientation orientat QModelIndex TransactionTableModel::index(int row, int column, const QModelIndex &parent) const { Q_UNUSED(parent); - TransactionRecord *data = priv->index(walletModel->wallet(), walletModel->clientModel().getNumBlocks(), row); + TransactionRecord *data = priv->index(walletModel->wallet(), walletModel->getNumBlocks(), row); if(data) { return createIndex(row, column, data); diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h index 07004b7c6..5521565f7 100644 --- a/src/qt/walletmodel.h +++ b/src/qt/walletmodel.h @@ -144,7 +144,7 @@ public: interfaces::Node& node() const { return m_node; } interfaces::Wallet& wallet() const { return *m_wallet; } - ClientModel& clientModel() const { return m_client_model; } + int getNumBlocks() const { return cachedNumBlocks; } QString getWalletName() const; QString getDisplayName() const; |