1
0

move update thread into the interface

This commit is contained in:
thomasv
2012-02-08 13:37:14 +01:00
parent a00b1e73a2
commit ee396a0633
4 changed files with 106 additions and 85 deletions

View File

@@ -573,23 +573,6 @@ class Wallet:
unconf += u
return conf, unconf
def update(self):
is_new = False
changed_addresses = self.interface.poll()
for addr, blk_hash in changed_addresses.items():
if self.status.get(addr) != blk_hash:
print "updating history for", addr
self.history[addr] = self.interface.retrieve_history(addr)
self.status[addr] = blk_hash
is_new = True
if is_new:
self.synchronize()
self.update_tx_history()
self.save()
return True
else:
return False
def choose_tx_inputs( self, amount, fixed_fee ):
""" todo: minimize tx size """