warn when out of sync

This commit is contained in:
Victor Shyba 2019-08-23 02:07:42 -03:00
parent 10bd3c9dda
commit 22b2cf8b0c

View file

@ -469,6 +469,15 @@ class BaseLedger(metaclass=LedgerRegistry):
if address_manager is not None: if address_manager is not None:
await address_manager.ensure_address_gap() await address_manager.ensure_address_gap()
local_status, local_history = await self.get_local_status_and_history(address)
if local_status != remote_status:
log.warning(
"Wallet is out of sync after syncing. Remote: %s with %d items, local: %s with %d items",
remote_status, len(remote_history), local_status, len(local_history)
)
else:
log.info("Sync completed for: %s", address)
async def cache_transaction(self, txid, remote_height): async def cache_transaction(self, txid, remote_height):
cache_item = self._tx_cache.get(txid) cache_item = self._tx_cache.get(txid)