anchor.diff:  
   %% @doc
   %% @end
  --spec add_peer(torrent_id()) -> {ok, pieceset()}.
  -add_peer(TorrentID) ->
  +-spec add_peer(torrent_id(), pieceset()) -> ok.
  +add_peer(TorrentID, Pieceset) ->
       SrvPid = lookup_scarcity_server(TorrentID),
  -    gen_server:call(SrvPid, {add_peer, self()}).
  -
  -
  -%% @doc
  -%% @end
  --spec add_piece(torrent_id(), pos_integer()) -> {ok, pieceset()}.
  -add_piece(TorrentID, PieceIndex) ->
  +    gen_server:call(SrvPid, {add_peer, self(), Pieceset}).
  +
  +
  +%% @doc
  +%% @end
  +-spec add_piece(torrent_id(), pos_integer(), pieceset()) -> ok.
  +add_piece(TorrentID, Index, Pieceset) ->
       SrvPid = lookup_scarcity_server(TorrentID),
  -    gen_server:call(SrvPid, {add_piece, self(), PieceIndex}).
  +    gen_server:call(SrvPid, {add_piece, self(), Index, Pieceset}).
   
   %% @doc
   %% @end
  
positive.code: 
  initial_ordering_case() ->
      {ok, _} = ?scarcity:start_link(2, 8),
      Pieces  = ?pieceset:from_list([0,1,2,3,4,5,6,7], 8),
      {ok, Order} = ?scarcity:get_order(2, Pieces),
      ?assertEqual([0,1,2,3,4,5,6,7], Order).
  
  empty_ordering_case() ->
      {ok, _} = ?scarcity:start_link(3, 8),
      Pieces  = ?pieceset:from_list([], 8),
      {ok, Order} = ?scarcity:get_order(3, Pieces),
      ?assertEqual([], Order).
  
  init_pieceset_case() ->
      {ok, _} = ?scarcity:start_link(4, 8),
      {ok, Set} = ?scarcity:add_peer(4),
      ?assertEqual([], ?pieceset:to_list(Set)).
  
  one_available_case() ->
      {ok, _} = ?scarcity:start_link(5, 8),
      {ok, _} = ?scarcity:add_peer(5),
      {ok, _} = ?scarcity:add_piece(5, 0),
      Pieces  = ?pieceset:from_list([0,1,2,3,4,5,6,7], 8),
      {ok, Order} = ?scarcity:get_order(5, Pieces),
      ?assertEqual([1,2,3,4,5,6,7,0], Order).
  
  
negative.code: -define(scarcity, ?MODULE).
  -define(pieceset, etorrent_pieceset).
  
  pieces(Pieces) ->
      ?pieceset:from_list(Pieces, 8).
  
  scarcity_server_test_() ->
      {setup,
          fun()  -> application:start(gproc) end,
  