minor fixes
This commit is contained in:
parent
29072ef1ad
commit
fe142452e2
|
@ -58,7 +58,7 @@ class Interface:
|
||||||
try:
|
try:
|
||||||
method = c['method']
|
method = c['method']
|
||||||
except:
|
except:
|
||||||
print "error"
|
print "error", c
|
||||||
return
|
return
|
||||||
|
|
||||||
if error:
|
if error:
|
||||||
|
@ -226,6 +226,7 @@ class HttpInterface(PollingInterface):
|
||||||
thread.start_new_thread(self.poll_thread, (15,))
|
thread.start_new_thread(self.poll_thread, (15,))
|
||||||
|
|
||||||
def poll(self):
|
def poll(self):
|
||||||
|
if self.session_id:
|
||||||
self.send( [] )
|
self.send( [] )
|
||||||
|
|
||||||
def send(self, messages):
|
def send(self, messages):
|
||||||
|
|
|
@ -270,11 +270,12 @@ class Wallet:
|
||||||
self.imported_keys = {}
|
self.imported_keys = {}
|
||||||
self.remote_url = None
|
self.remote_url = None
|
||||||
|
|
||||||
self.was_updated = False
|
self.was_updated = True
|
||||||
self.blocks = 0
|
self.blocks = 0
|
||||||
self.banner = ''
|
self.banner = ''
|
||||||
self.up_to_date_event = threading.Event()
|
self.up_to_date_event = threading.Event()
|
||||||
self.up_to_date_event.clear()
|
self.up_to_date_event.clear()
|
||||||
|
self.up_to_date = False
|
||||||
self.interface_lock = threading.Lock()
|
self.interface_lock = threading.Lock()
|
||||||
self.tx_event = threading.Event()
|
self.tx_event = threading.Event()
|
||||||
|
|
||||||
|
@ -967,6 +968,7 @@ class Wallet:
|
||||||
def run(self):
|
def run(self):
|
||||||
while self.interface.is_connected:
|
while self.interface.is_connected:
|
||||||
new_addresses = self.synchronize()
|
new_addresses = self.synchronize()
|
||||||
|
if new_addresses:
|
||||||
self.interface.subscribe(new_addresses)
|
self.interface.subscribe(new_addresses)
|
||||||
if self.interface.is_up_to_date() and not new_addresses:
|
if self.interface.is_up_to_date() and not new_addresses:
|
||||||
self.up_to_date = True
|
self.up_to_date = True
|
||||||
|
|
Loading…
Reference in New Issue