Browse Source

qt history: fix refresh bug ("verified"/fee histogram interplay)

3.3.3.1
SomberNight 6 years ago
parent
commit
f0f73380a2
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 11
      electrum/gui/qt/history_list.py

11
electrum/gui/qt/history_list.py

@ -273,22 +273,27 @@ class HistoryModel(QAbstractItemModel, PrintError):
self.dataChanged.emit(idx, idx, [Qt.DisplayRole, Qt.ForegroundRole])
def update_tx_mined_status(self, tx_hash: str, tx_mined_info: TxMinedInfo):
self.tx_status_cache[tx_hash] = self.parent.wallet.get_tx_status(tx_hash, tx_mined_info)
try:
row = self.transactions.pos_from_key(tx_hash)
tx_item = self.transactions[tx_hash]
except KeyError:
return
self.tx_status_cache[tx_hash] = self.parent.wallet.get_tx_status(tx_hash, tx_mined_info)
tx_item.update({
'confirmations': tx_mined_info.conf,
'timestamp': tx_mined_info.timestamp,
'txpos_in_block': tx_mined_info.txpos,
})
topLeft = self.createIndex(row, 0)
bottomRight = self.createIndex(row, len(HistoryColumns) - 1)
self.dataChanged.emit(topLeft, bottomRight)
def on_fee_histogram(self):
for tx_hash, tx_item in self.transactions.items():
for tx_hash, tx_item in list(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):

Loading…
Cancel
Save