Refactor for loop in UTXOList
This refactor makes UTXOList somewhat easier to subclass.
This commit is contained in:
parent
0f0cee422e
commit
8716bc8cfb
@ -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')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user