public static GetDataMessage Read(BitcoinStreamReader reader)
        {
            ulong count = reader.ReadUInt64Compact();
            if (count > 50000)
            {
                //todo: handle correctly
                throw new Exception("Too many inventory vectors.");
            }

            InventoryVector[] inventory = new InventoryVector[count];
            for (ulong i = 0; i < count; i++)
            {
                inventory[i] = InventoryVector.Read(reader);
            }

            return new GetDataMessage(inventory);
        }
 public GetDataMessage(InventoryVector[] inventory)
 {
     this.inventory = new List<InventoryVector>(inventory);
 }