anchor.diff:        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 ->
  
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:               %% need to fetch the stored peer record to get proper block
                %% status
                Key = hash_uri(P0#peer.uri),
                case lookup_peer(P0#peer.uri, State1) of
                    none ->
                        lager:debug("Couldn't find just added ~p", [P0#peer.uri]),
                        ok;
                    {value, Key, Peer} ->
                        case has_been_seen_(Peer) of
                            true -> ok;
                            false ->
                                maybe_ping_peer(Peer, State1)
                        end
                end
        end, PeerRecs),
      {noreply, metrics(State1)};
  handle_cast({remove, PeerUri}, State = #state{peers = Peers}) ->
      HashUri = hash_uri(normalize_uri(PeerUri)),
      case gb_trees:lookup(HashUri, Peers) of
  