received coins need to be known before
This commit is contained in:
parent
91feae01ac
commit
6cb51ea4d0
|
@ -484,6 +484,14 @@ class Wallet:
|
||||||
c = u = 0
|
c = u = 0
|
||||||
received_coins = []
|
received_coins = []
|
||||||
|
|
||||||
|
for tx_hash, tx_height in h:
|
||||||
|
d = self.transactions.get(tx_hash)
|
||||||
|
if not d: continue
|
||||||
|
for item in d.get('outputs'):
|
||||||
|
addr = item.get('address')
|
||||||
|
key = tx_hash + ':%d'%item['index']
|
||||||
|
received_coins.append(key)
|
||||||
|
|
||||||
for tx_hash, tx_height in h:
|
for tx_hash, tx_height in h:
|
||||||
d = self.transactions.get(tx_hash)
|
d = self.transactions.get(tx_hash)
|
||||||
if not d: continue
|
if not d: continue
|
||||||
|
@ -502,7 +510,6 @@ class Wallet:
|
||||||
key = tx_hash + ':%d'%item['index']
|
key = tx_hash + ':%d'%item['index']
|
||||||
if addr == address:
|
if addr == address:
|
||||||
v += item.get('value')
|
v += item.get('value')
|
||||||
received_coins.append(key)
|
|
||||||
|
|
||||||
if tx_height:
|
if tx_height:
|
||||||
c += v
|
c += v
|
||||||
|
|
Loading…
Reference in New Issue