anchor.diff:  
   handle_call({request_chunks, PeerPid, Peerset, Numchunks}, _, State) ->
       #state{
  +        pieces_valid=Valid,
           pieces_unassigned=Unassigned,
           pieces_begun=Begun,
           pieces_assigned=Assigned,
  -        pieces_stored=Stored,
           chunks_assigned=AssignedChunks,
           peer_monitors=Peers} = State,
   
  
positive.code: %%
  %% ## Stored
  %% When all chunks of a piece in the Assigned state has been marked
  %% as stored the piece enters the Stored state. A piece will only
  %% leave the Stored state and enter the Valid state once the piece
  %% has been marked as valid.
  %%
  %% ## Valid
  %% A piece enters the valid state from the Stored state.
  %% A piece can never leave the Valid state.
  %%
  %% # Priority of pieces
  %% The chunk server uses the scarcity server to keep an updated
  
negative.code:     end,
  
      PieceIndex = case Targetstate of
          none ->
              %% We know that the peer has no pieces in the Unassigned or
              %% Begun states. This leaves us with Assigned, Stored and
              %% Valid pieces. If the peer has any pieces that are not
              %% in the Valid state we are still interested.
              Interesting = etorrent_pieceset:difference(Peerset, Valid),
              case etorrent_pieceset:is_empty(Interesting) of
                  false -> assigned;
                  true  -> not_interested
              end;
          %% One or more that we are already downloading
          begun ->
  