diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2020-04-24 17:40:33 -0400 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2020-05-01 06:59:09 -0400 |
commit | 83f69fab3a1ae97c5cff8ba1e6fd191b0fa264bb (patch) | |
tree | fbbbed9146b8baabc077896cbafdd28b91624fe3 /src/qt | |
parent | 608359b071dac82a9cf33a6c9e01f87abfcb90eb (diff) | |
download | bitcoin-83f69fab3a1ae97c5cff8ba1e6fd191b0fa264bb.tar.xz |
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.
Diffstat (limited to 'src/qt')
-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 18554aef1f..7a15503228 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 07004b7c6b..5521565f7c 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; |