anchor.diff:              Peer1 = save_ping_event(Res, Time, Peer),
               Peer2 = start_ping_timer(CalcF, Peer1),
               Peers = enter_peer(Peer2, State#state.peers),
  -            State#state{peers = Peers}
  +            Errored = update_errored(Res, Peer#peer.uri, State#state.errored),
  +            State#state{peers = Peers, errored = Errored}
       end.
   
   update_ping_metrics(Res) ->
  
positive.code:     Acc.
  
  pick_values(Ps, I) ->
      pick_values(Ps, 1, gb_trees:next(I), ordsets:new()).
  
  pick_values([H|T], H, {_, V, I}, Acc) ->
      pick_values(T, H+1, gb_trees:next(I), [V|Acc]);
  pick_values(Ps, N, {_, _, I}, Acc) ->
      pick_values(Ps, N+1, gb_trees:next(I), Acc);
  pick_values([], _, _, Acc) ->
      Acc.
  
  has_been_seen(Key, Peers) ->
      case gb_trees:lookup(Key, Peers) of
          none ->
              false;
          {value, Peer} ->
              Peer#peer.last_seen =/= 0
      end.
  
  ping_peer(Peer) ->
      %% Don't ping until our own HTTP endpoint is up. This is not strictly
  
negative.code:       pick_values(Ps, I)
      end.
  
  exclude_from_set(Set, Tree, S) ->
      gb_sets:fold(
        fun(Uri, Acc) ->
                exclude_peer_uri(Uri, Acc, S)
        end, Tree, Set).
  
  
  exclude_peer_uri(Uri, T, S) ->
      case lookup_peer(Uri, S) of
          none ->
  