anchor.diff:      UpFun =
           fun (#node_state{state = removed}, Acc) -> Acc;
               (NodeState, Acc) ->
  +                case NodeState#node_state.state of
  +                    up -> ok;
  +                    Prev ->
  +                        ?log_debug("Transitioned node ~p state ~p -> up", [NodeState#node_state.name, Prev])
  +                end,
                   [NodeState#node_state{state = up,
                                         down_counter = 0,
                                         mailed_down_warning = false}
  
positive.code: -module(auto_failover_logic).
  
  -include_lib("eunit/include/eunit.hrl").
  
  -export([process_frame/4,
           init_state/1]).
  
negative.code:                           fun (#node_state{state=nearly_down,name=Node,
                                             mailed_down_warning=false}=S,
                                 {Warnings, DS}) ->
                                    {[{mail_down_warning, Node}|Warnings],
                                     [S#node_state{mailed_down_warning=true}|DS]};
                                %% Warning was already sent
                                (S, {Warnings, DS}) ->
                                    {Warnings, [S|DS]}
                            end, {[], []}, Else),
  