synchronizer: fix refresh bug
This commit is contained in:
@@ -643,6 +643,8 @@ class AddressSynchronizer(PrintError):
|
|||||||
def set_up_to_date(self, up_to_date):
|
def set_up_to_date(self, up_to_date):
|
||||||
with self.lock:
|
with self.lock:
|
||||||
self.up_to_date = up_to_date
|
self.up_to_date = up_to_date
|
||||||
|
if self.network:
|
||||||
|
self.network.notify('status')
|
||||||
if up_to_date:
|
if up_to_date:
|
||||||
self.save_transactions(write=True)
|
self.save_transactions(write=True)
|
||||||
# if the verifier is also up to date, persist that too;
|
# if the verifier is also up to date, persist that too;
|
||||||
|
|||||||
@@ -308,7 +308,8 @@ class Network(PrintError):
|
|||||||
self.notify('status')
|
self.notify('status')
|
||||||
|
|
||||||
def is_connected(self):
|
def is_connected(self):
|
||||||
return self.interface is not None and self.interface.ready.done()
|
interface = self.interface
|
||||||
|
return interface is not None and interface.ready.done()
|
||||||
|
|
||||||
def is_connecting(self):
|
def is_connecting(self):
|
||||||
return self.connection_status == 'connecting'
|
return self.connection_status == 'connecting'
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ class Synchronizer(PrintError):
|
|||||||
return s
|
return s
|
||||||
|
|
||||||
async def main(self):
|
async def main(self):
|
||||||
|
self.wallet.set_up_to_date(False)
|
||||||
# request missing txns, if any
|
# request missing txns, if any
|
||||||
async with TaskGroup() as group:
|
async with TaskGroup() as group:
|
||||||
for history in self.wallet.history.values():
|
for history in self.wallet.history.values():
|
||||||
|
|||||||
Reference in New Issue
Block a user