mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 12:09:57 +00:00
tracking: query blockchain height only once during update
This commit is contained in:
parent
7adeb694c1
commit
cd024bed8b
1 changed files with 3 additions and 3 deletions
|
@ -80,7 +80,7 @@ Rectangle {
|
||||||
var count = model.rowCount()
|
var count = model.rowCount()
|
||||||
var totalAmount = 0
|
var totalAmount = 0
|
||||||
var nTransactions = 0
|
var nTransactions = 0
|
||||||
var blockchainHeight = 0
|
var blockchainHeight = null
|
||||||
var txs = []
|
var txs = []
|
||||||
|
|
||||||
for (var i = 0; i < count; ++i) {
|
for (var i = 0; i < count; ++i) {
|
||||||
|
@ -103,8 +103,8 @@ Rectangle {
|
||||||
if (blockHeight == 0) {
|
if (blockHeight == 0) {
|
||||||
in_txpool = true;
|
in_txpool = true;
|
||||||
} else {
|
} else {
|
||||||
if (blockchainHeight == 0)
|
if (blockchainHeight == null)
|
||||||
blockchainHeight = walletManager.blockchainHeight()
|
blockchainHeight = appWindow.currentWallet.blockChainHeight()
|
||||||
confirmations = blockchainHeight - blockHeight - 1
|
confirmations = blockchainHeight - blockHeight - 1
|
||||||
displayAmount = model.data(idx, TransactionHistoryModel.TransactionDisplayAmountRole);
|
displayAmount = model.data(idx, TransactionHistoryModel.TransactionDisplayAmountRole);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue