mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 07:51:27 +00:00
qt history list: optimise fee histogram induced refresh
This commit is contained in:
parent
696db310a5
commit
a99b92f613
2 changed files with 10 additions and 1 deletions
|
@ -257,6 +257,15 @@ class HistoryModel(QAbstractItemModel, PrintError):
|
|||
bottomRight = self.createIndex(row, self.NUM_COLUMNS-1)
|
||||
self.dataChanged.emit(topLeft, bottomRight)
|
||||
|
||||
def on_fee_histogram(self):
|
||||
for tx_hash, tx_item in self.transactions.items():
|
||||
tx_mined_info = self.tx_mined_info_from_tx_item(tx_item)
|
||||
if tx_mined_info.conf > 0:
|
||||
# note: we could actually break here if we wanted to rely on the order of txns in self.transactions
|
||||
continue
|
||||
self.tx_status_cache[tx_hash] = self.parent.wallet.get_tx_status(tx_hash, tx_mined_info)
|
||||
self.update_tx_mined_status(tx_hash, tx_mined_info)
|
||||
|
||||
def headerData(self, section: int, orientation: Qt.Orientation, role: Qt.ItemDataRole):
|
||||
assert orientation == Qt.Horizontal
|
||||
if role != Qt.DisplayRole:
|
||||
|
|
|
@ -356,7 +356,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
|||
if self.config.is_dynfee():
|
||||
self.fee_slider.update()
|
||||
self.do_update_fee()
|
||||
self.history_model.refresh('fee_histogram')
|
||||
self.history_model.on_fee_histogram()
|
||||
else:
|
||||
self.print_error("unexpected network_qt signal:", event, args)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue