Browse Source
Refactor for loop in UTXOList
This refactor makes UTXOList somewhat easier to subclass.
sqlite_db
JeremyRand
6 years ago
No known key found for this signature in database
GPG Key ID: B3F2D165786D6570
1 changed files with
19 additions and
16 deletions
-
electrum/gui/qt/utxo_list.py
|
|
@ -47,6 +47,9 @@ class UTXOList(MyTreeView): |
|
|
|
self.model().clear() |
|
|
|
self.update_headers(self.__class__.headers) |
|
|
|
for idx, x in enumerate(utxos): |
|
|
|
self.insert_utxo(idx, x) |
|
|
|
|
|
|
|
def insert_utxo(self, idx, x): |
|
|
|
address = x.get('address') |
|
|
|
height = x.get('height') |
|
|
|
name = x.get('prevout_hash') + ":%d"%x.get('prevout_n') |
|
|
|