assert address is in wallet (use watch_address if it is not)
This commit is contained in:
parent
3a0381bc06
commit
86e867ae30
|
@ -609,11 +609,8 @@ class Wallet:
|
||||||
|
|
||||||
|
|
||||||
def get_addr_balance(self, addr):
|
def get_addr_balance(self, addr):
|
||||||
if self.is_mine(addr):
|
assert self.is_mine(addr)
|
||||||
h = self.history.get(addr)
|
h = self.history.get(addr,[])
|
||||||
else:
|
|
||||||
h = self.interface.retrieve_history(addr)
|
|
||||||
if not h: return 0,0
|
|
||||||
c = u = 0
|
c = u = 0
|
||||||
for item in h:
|
for item in h:
|
||||||
v = item['value']
|
v = item['value']
|
||||||
|
|
Loading…
Reference in New Issue