anchor.diff:      
       %% If this peer has no pieces that we are already downloading, begin
       %% downloading a new piece if this peer has any interesting pieces.
  -    OptimalPieces    = etorrent_pieceset:intersection(Peerset, PiecesValid),
  +    OptimalPieces    = etorrent_pieceset:intersection(Peerset, PiecesChunked),
       SubOptimalPieces = etorrent_pieceset:difference(Peerset, PiecesValid),
       NumOptimal    = etorrent_pieceset:size(OptimalPieces),
       NumSubOptimal = etorrent_pieceset:size(SubOptimalPieces),
   
  +    ?debugVal({NumOptimal, NumSubOptimal}),
       PieceIndex = case {NumOptimal, NumSubOptimal} of
           %% None that we are not already downloading
           %% and none that we would want to download
  
positive.code:         [?_test(lookup_registered_case()),
           ?_test(unregister_case()),
           ?_test(not_interested_case()),
           ?_test(request_one_case()),
           ?_test(mark_dropped_case()),
           ?_test(mark_all_dropped_case()),
  
negative.code:     Srv = initial_chunk_server(1),
      Has = etorrent_pieceset:from_list([], 3),
      Ret = ?chunk_server:request_chunks(1, Has, 1),
      ?assertEqual({error, not_interested}, Ret).
  
  not_interested_valid_case() ->
      ID = 9,
      {ok, Srv} = ?chunk_server:start_link(ID, 1, [0], [{0, 2}, {1, 2}, {2, 2}]),
      true = ?chunk_server:register_peer(ID),
      Has = etorrent_pieceset:from_list([0], 3),
      Ret = ?chunk_server:request_chunks(ID, Has, 1),
      ?assertEqual({error, not_interested}, Ret).
  
  request_one_case() ->
      Srv = initial_chunk_server(2),
  