anchor.diff:  handle_cast(nodes_wanted_updated, State) ->
       do_nodes_wanted_updated(do_nodes_wanted()),
       {noreply, State};
  +
  +handle_cast(we_were_shunned, #state{we_were_shunned = true} = State) ->
  +    {noreply, State};
  +
  +handle_cast({we_were_shunned, NodeList}, State) ->
  +    %% Must have been shunned while we were down. Leave the cluster.
  +    ?log_info("We've been shunned (nodes_wanted = ~p). "
  +              "Leaving cluster.", [NodeList]),
  +    ns_cluster:leave_async(),
  +    {noreply, State#state{we_were_shunned = true}};
   
   handle_cast(_Msg, State)       -> {noreply, State}.
   
  
positive.code: -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
           terminate/2, code_change/3]).
  
  -record(state, {nodes}).
  
  -include_lib("eunit/include/eunit.hrl").
  
  
negative.code:         true ->
              ok;
          false ->
              gen_server:cast(ns_node_disco, {we_were_shunned, NodeList})
      end,
      ok.
  
  