anchor.diff:  
   -define(SERVER, ?MODULE).
   
  -%%====================================================================
  -%% API
  -%%====================================================================
  -%%--------------------------------------------------------------------
  -%% Function: start_link() -> {ok,Pid} | ignore | {error,Error}
  -%% Description: Starts the server
  -%%--------------------------------------------------------------------
  +%% ====================================================================
  +-spec start_link() -> ignore | {ok, pid()} | {error, term()}.
   start_link() ->
       gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
   
   %% Send state information
  +-spec choke(integer(), pid()) -> ok.
   choke(Id, Pid) -> gen_server:cast(?SERVER, {choke, Id, Pid}).
  +
  +-spec unchoke(integer(), pid()) -> ok.
   unchoke(Id, Pid) -> gen_server:cast(?SERVER, {unchoke, Id, Pid}).
  +
  +-spec interested(integer(), pid()) -> ok.
   interested(Id, Pid) -> gen_server:cast(?SERVER, {interested, Id, Pid}).
  +
  +-spec not_interested(integer(), pid()) -> ok.
   not_interested(Id, Pid) -> gen_server:cast(?SERVER, {not_interested, Id, Pid}).
  +
  +-spec local_choke(integer(), pid()) -> ok.
   local_choke(Id, Pid) -> gen_server:cast(?SERVER, {local_choke, Id, Pid}).
  +
  +-spec local_unchoke(integer(), pid()) -> ok.
   local_unchoke(Id, Pid) -> gen_server:cast(?SERVER, {local_unchoke, Id, Pid}).
   
   -spec get_state(integer(), pid()) -> {value, boolean(), #peer_state{}}.
  
positive.code:     end,
      ok.
  
  fetch_rate(Where, Id, Pid) ->
      case ets:lookup(Where, {Id, Pid}) of
          [] ->
  
negative.code: handle_info(_Info, State) ->
      {noreply, State}.
  
  terminate(_Reason, _S) ->
      ok.
  
  code_change(_OldVsn, State, _Extra) ->
      {ok, State}.
  
  %% --------------------------------------------------------------------
  sum_global_rate(Table) ->
      Objs = ets:match_object(Table, #rate_mgr { _ = '_' }),
      lists:sum([K#rate_mgr.rate || K <- Objs]).
  