         end)
 
         interest_msg =
-          case peer_data.piece_table do
+          case peer_data.torrent_tracking_info.piece_table do
             %{} ->
               Logger.debug(fn -> "#{peer_data.name} has nothing of interest" end)
 


    case @torrent_impl.get_next_piece_index(
           peer_data.torrent_id,
           Map.keys(peer_data.piece_table)
         ) do
      {:ok, next_piece_index} ->
        next_sub_piece_index = 0


    case @torrent_impl.get_next_piece_index(
           peer_data.torrent_id,
           Map.keys(peer_data.torrent_tracking_info.piece_table)
         ) do
      {:ok, next_piece_index} ->
        next_sub_piece_index = 0
