'Called from the network proxy thread main loop.'

def run(self):

    self.wallet.synchronize()
    with self.lock:
        addresses = self.new_addresses
        self.new_addresses = set()
    self.subscribe_to_addresses(addresses)
    up_to_date = self.is_up_to_date()
    if (up_to_date != self.wallet.is_up_to_date()):
        self.wallet.set_up_to_date(up_to_date)
        self.network.trigger_callback('updated')
