docs: def handle_inv(self, message_header, inv_packet ):
          """
          Get the data we just requested.
          Shouldn't happen with newer servers, since they use
          getheaders/headers followed by getdata/blocks
          (older peers use getblocks/inv/getdata/inv exchanges)
          """
          log.debug("handle inv of %s item(s)" % len(inv_packet.inventory))
  
          reply_inv = []
  
          for inv_info in inv_packet.inventory:
              inv_hash = "%064x" % inv_info.inv_hash
              if inv_info.inv_type == INVENTORY_TYPE["MSG_BLOCK"]:
                  # only ask for the block if we need it
                  if inv_hash in self.block_info.keys() and not self.block_info[inv_hash]['handled']:
                      log.debug("Will request block %s" % inv_hash)
                      reply_inv.append( inv_info )
                      inv_hash = None
  
  
          if len(reply_inv) > 0:
              getdata = GetData()
              getdata.inventory = reply_inv
              log.debug("send GetData in reply to Inv for %s item(s)" % len(reply_inv))
              self.send_message(getdata)
  
          else:
              if self.have_all_block_data():
                  self.loop_exit()