anchor.diff:  %% Handles event adding a new peer to the pool.
   -spec on_add_peer(inet:ip_address(), peer(), state()) -> state().
   on_add_peer(SourceAddr, Peer, State0) ->
  -    State = maybe_unblock(State0),
  +    #state{ hostnames = HostMap } = State0,
  +    State = maybe_unblock(State0#state{hostnames = maps:remove(Peer#peer.host, HostMap)}),
       PeerId  = peer_id(Peer),
       #peer{ pubkey = PPK, address = PA, port = PP } = Peer,
       case is_local(PeerId, State) orelse is_blocked(PeerId, State) of
  
positive.code: peer_info(#peer{ host = H, port = P, pubkey = PK }) ->
      #{ host => H, port => P, pubkey => PK }.
  
  %% Creates a peer record from peer's information map.
  -spec peer(peer_info(), boolean())
      -> {ok, peer()} | {error, term()}.
  peer(PeerInfo, IsTrusted) ->
      #{ host := Host } = PeerInfo,
      case inet:getaddr(to_list(Host), inet) of
          {error, _} = Error -> Error;
          {ok, Addr} -> {ok, peer(Addr, PeerInfo, IsTrusted)}
      end.
  
  %% Creates a peer record from peer's information and resolved address.
  -spec peer(inet:ip_address(), peer_info(), boolean()) -> peer().
  peer(PeerAddr, PeerInfo, IsTrusted) ->
  
negative.code: add_trusted(PeerInfos) when is_list(PeerInfos) ->
      lists:foreach(fun(I) -> add_trusted(I) end, PeerInfos);
  add_trusted(PeerInfo) ->
      async_add_peer(undefined, PeerInfo, true).
  
  %% @doc Adds a normal peer or a list of normal peers.
  %% The IP address of the node that gave us this peer must be specified.
  