assert address is in wallet (use watch_address if it is not)

This commit is contained in:
ThomasV 2012-05-01 10:55:10 +02:00
parent 3a0381bc06
commit 86e867ae30
1 changed files with 2 additions and 5 deletions

View File

@ -609,11 +609,8 @@ class Wallet:
def get_addr_balance(self, addr):
if self.is_mine(addr):
h = self.history.get(addr)
else:
h = self.interface.retrieve_history(addr)
if not h: return 0,0
assert self.is_mine(addr)
h = self.history.get(addr,[])
c = u = 0
for item in h:
v = item['value']