treceived coins need to be known before - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 6cb51ea4d03f0586cdeb6dcc6532038ba8d24c2e
DIR parent 91feae01acb4cf764eb2c0fbedef1000236ba034
HTML Author: thomasv <thomasv@gitorious>
Date: Thu, 22 Nov 2012 13:24:44 +0100
received coins need to be known before
Diffstat:
M lib/wallet.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
DIR diff --git a/lib/wallet.py b/lib/wallet.py
t@@ -487,6 +487,14 @@ class Wallet:
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:
+ d = self.transactions.get(tx_hash)
+ if not d: continue
v = 0
for item in d.get('inputs'):
t@@ -502,7 +510,6 @@ class Wallet:
key = tx_hash + ':%d'%item['index']
if addr == address:
v += item.get('value')
- received_coins.append(key)
if tx_height:
c += v