anchor.diff:      probe(init, State3).
   
   -spec handle_event(_, atom(), state()) -> {next_state, atom(), state()}.
  +handle_event({watch_leader_status, Pid}, StateName, State) when node(Pid) =/= node() ->
  +    lager:warning("Remote pid ~p not allowed to watch_leader_status on ensemble peer ~p",
  +                  [Pid, State#state.id]),
  +    {next_state, StateName, State};
  +handle_event({watch_leader_status, Pid}, StateName, State = #state{watchers = Watchers}) ->
  +    notify_leader_status(Pid, StateName, State),
  +    %% Might as well take this opportunity to prune any dead pids that are in the list
  +    NewWatcherList = [P || P <- [Pid | Watchers], is_process_alive(P)],
  +    {next_state, StateName, State#state{watchers = NewWatcherList}};
   handle_event({reply, ReqId, Peer, Reply}, StateName, State) ->
       State2 = handle_reply(ReqId, Peer, Reply, State),
       {next_state, StateName, State2};
  
positive.code:     common(Msg, From, State, prelead).
  
  -spec leading(_, state()) -> next_state().
  leading(init, State=#state{id=_Id}) ->
      ?OUT("~p: Leading~n", [_Id]),
      _ = lager:info("~p: Leading~n", [_Id]),
      start_exchange(State),
      leading(tick, State#state{alive=?ALIVE, tree_ready=false});
  leading(tick, State) ->
      leader_tick(State);
  
negative.code: -spec get_leader(pid()) -> peer_id().
  get_leader(Pid) when is_pid(Pid) ->
      gen_fsm:sync_send_all_state_event(Pid, get_leader, infinity).
  
  -spec watch_leader_status(pid()) -> ok.
  watch_leader_status(Pid) when is_pid(Pid) ->
      gen_fsm:send_all_state_event(Pid, {watch_leader_status, self()}).
  
  get_info(Pid) when is_pid(Pid) ->
      gen_fsm:sync_send_all_state_event(Pid, get_info, infinity).
  