code: def ProcessBlocks(self, block_limit=1000):
          
          self._lock.acquire()
          try:
              blockcount = 0
              while self._current_height <= Blockchain.Default().Height and (block_limit == 0 or blockcount < block_limit):
  
                  block = Blockchain.Default().GetBlockByHeight(self._current_height)
  
                  if block is not None:
                      self.ProcessNewBlock(block)
                  else:
                      self._current_height += 1
  
                  blockcount += 1
  
              self.SaveStoredData("Height", self._current_height)
          except Exception as e:
              logger.warn("Could not process ::: %s " % e)
          finally:
              self._lock.release()
docs: Method called on a loop to check the current height of the blockchain.  If the height of the blockchain
          is more than the current stored height in the wallet, we get the next block in line and
          processes it.
  
          In the case that the wallet height is far behind the height of the blockchain, we do this 1000
          blocks at a time.
  
          Args:
              block_limit (int): the number of blocks to process synchronously. defaults to 1000. set to 0 to block until the wallet is fully rebuilt.