anchor.diff:           add_peer/2,
            add_piece/3,
            get_order/2,
  -         watch/3]).
  +         watch/3,
  +         unwatch/2]).
   
   %% gen_server callbacks
   -export([init/1,
  
positive.code: watch(TorrentID, Tag, Pieceset) ->
      SrvPid = lookup_scarcity_server(TorrentID),
      gen_server:call(SrvPid, {watch, self(), Tag, Pieceset}).
  
  
  %% @private
  
negative.code:     Piecelist = sorted_piecelist(Pieceset, Numpeers),
      NewState = State#state{
          watchers=NewWatchers},
      {reply, {ok, Ref, Piecelist}, NewState};
  
  handle_call({unwatch, Ref}, _, State) ->
      #state{watchers=Watchers} = State,
      demonitor(Ref),
      NewWatchers = lists:keydelete(Ref, #watcher.ref, Watchers),
      NewState = State#state{watchers=NewWatchers},
      {reply, ok, NewState}.
  
  
  %% @private
  