code: def HandleInvMessage(self, payload):
          
  
          if self.sync_mode != MODE_MAINTAIN:
              return
  
          inventory = IOHelper.AsSerializableWithType(payload, 'neo.Network.Payloads.InvPayload.InvPayload')
          if not inventory:
              return
  
          if inventory.Type == InventoryType.BlockInt:
  
              ok_hashes = []
              for hash in inventory.Hashes:
                  hash = hash.encode('utf-8')
                  if hash not in self.myblockrequests and hash not in BC.Default().BlockRequests:
                      ok_hashes.append(hash)
                      BC.Default().BlockRequests.add(hash)
                      self.myblockrequests.add(hash)
              if len(ok_hashes):
                  message = Message("getdata", InvPayload(InventoryType.Block, ok_hashes))
                  self.SendSerializedMessage(message)
  
          elif inventory.Type == InventoryType.TXInt:
              pass
          elif inventory.Type == InventoryType.ConsensusInt:
              pass
docs: Process a block header inventory payload.
  
          Args:
              inventory (neo.Network.Payloads.InvPayload):