anchor.diff:  common(tree_pid, From, State, StateName) ->
       gen_fsm:reply(From, State#state.tree),
       {next_state, StateName, State};
  -common(tree_corrupted, From, State, _StateName) ->
  +common(tree_corrupted, From, State, StateName) ->
       gen_fsm:reply(From, ok),
  +    lager:debug("~p: tree_corrupted in state ~p", [State#state.id, StateName]),
       repair(init, State);
   common(_Msg, From, State, StateName) ->
  -    ?OUT("~p: ~s/ignoring: ~p~n", [State#state.id, StateName, _Msg]),
       send_reply(From, nack),
       {next_state, StateName, State}.
   
  
positive.code: 
  -spec leading(_, state()) -> next_state().
  leading(init, State=#state{id=_Id, watchers=Watchers}) ->
      ?OUT("~p: Leading~n", [_Id]),
      _ = lager:info("~p: Leading~n", [_Id]),
      start_exchange(State),
      _ = notify_leader_status(Watchers, leading, State),
  
negative.code:     common(Msg, From, State, probe).
  
  pending(init, State) ->
      lager:debug("~p: pending init", [State#state.id]),
      State2 = set_timer(?PENDING_TIMEOUT, pending_timeout, State),
      {next_state, pending, State2#state{tree_trust=false}};
  pending(pending_timeout, State) ->
      lager:debug("~p: pending_timeout", [State#state.id]),
      probe({timeout, []}, State);
  pending({prepare, Id, NextEpoch, From}, State=#state{fact=Fact}) ->
      Epoch = epoch(State),
      case NextEpoch > Epoch of
          true ->
              lager:debug("~p: accepting ~p from ~p (~p)", [Id, NextEpoch, Id, Epoch]),
              reply(From, Fact, State),
              State2 = cancel_timer(State),
              prefollow({init, Id, NextEpoch}, State2);
          false ->
              lager:debug("~p: rejecting ~p from ~p (~p)", [Id, NextEpoch, Id, Epoch]),
              {next_state, pending, State}
      end;
  pending({commit, NewFact, From}, State) ->
  