This commit is contained in:
ThomasV 2012-03-17 16:17:11 +01:00
parent 10daacf353
commit 6145c21c95
2 changed files with 6 additions and 4 deletions

View File

@ -80,9 +80,10 @@ class PollingInterface(Interface):
apply(self.history_callback, (addr, data) )
self.was_updated = True
def subscribe(self, addr):
status = self.handler('address.subscribe', [ self.session_id, addr ] )
apply(self.address_callback, (addr, status) )
def subscribe(self, addresses):
for addr in addresses:
status = self.handler('address.subscribe', [ self.session_id, addr ] )
apply(self.address_callback, (addr, status) )
def update_wallet(self):
while True:

View File

@ -456,7 +456,7 @@ class Wallet:
def create_new_address(self, bool):
address = self.create_new_address_without_history(bool)
self.interface.subscribe(address)
self.interface.subscribe([address])
return address
@ -701,6 +701,7 @@ class Wallet:
def receive_status_callback(self, addr, status):
if self.status.get(addr) != status:
#print "updating status for", addr
self.status[addr] = status
self.interface.get_history(addr)