anchor.diff:      end,
       Result.
   
  +handle_crash(Pid, State, Handler) ->
  +    RTMs = state_get_RTMs(State),
  +    NewRTMs = [ case get_rtmpid(RTM) of
  +                    X when unknown =:= X orelse {Pid} =:= X ->
  +                        I = get_nth(RTM),
  +                        Name = get_nth_rtm_name(I),
  +                        Key = get_rtmkey(RTM),
  +                        api_dht_raw:unreliable_lookup(
  +                          Key, {get_rtm, comm:this(), Key, Name}),
  +                        rtm_entry_new(Key, unknown, I, unknown);
  +                    _ -> RTM
  +                end
  +                || RTM <- RTMs ],
  +    
  +
  +    %% scan over all running transactions and delete this Pid
  +    %% if necessary, takeover the tx and try deciding with abort
  +    NewState = State,
  +%%     NewState = lists:foldl(
  +%%                  fun(X,StateIter) ->
  +%%                          case tx_state:is_tx_state(X) of
  +%%                              true ->
  +%%                                  ct:pal("propose yourself (~.0p/~.0p) for: ~.0p~n",
  +%%                                         [self(),
  +%%                                          pid_groups:group_and_name_of(self()),
  +%%                                          tx_state:get_tid(X)]),
  +%%                                  on({tx_tm_rtm_propose_yourself, tx_state:get_tid(X)}, StateIter);
  +%%                              false -> StateIter
  +%%                          end
  +%%                 end, State, pdb:tab2list(state_get_tablename(State))),
  +
  +    %% no longer use this RTM
  +    ValidRTMs = [ X || X <- NewRTMs, unknown =/= get_rtmpid(X) ],
  +    case length(ValidRTMs) < 3
  +        andalso tx_tm =:= state_get_role(NewState)
  +        andalso on =:= Handler of
  +        true ->
  +            comm:send_local(self(), {update_RTMs_on_init}),
  +            gen_component:change_handler(
  +              state_set_RTMs(NewState, NewRTMs),
  +              fun ?MODULE:on_init/2);
  +        false -> state_set_RTMs(NewState, NewRTMs)
  +    end.
  +
  +
  +
  +
  +
   
   %% @doc Checks whether config parameters for tx_tm_rtm exist and are
   %%      valid.
  
positive.code:               case {InPid} =/= RTM of
                    true -> case RTM of
                                unknown -> ok;
                                _ -> fd:unsubscribe(element(1, RTM), tx_tm_rtm_fd_cookie)
                            end,
                            fd:subscribe(InPid, tx_tm_rtm_fd_cookie);
                    false -> ok
                end,
                rtm_entry_new(InKey, {InPid}, get_nth(Entry), {InAccPid});
  
negative.code:     ?TRACE_RTM_MGMT("tx_tm_rtm:on:update_RTMs in Pid ~p ~n", [self()]),
      tx_tm = state_get_role(State),
      RTMs = state_get_RTMs(State),
      rtm_update(RTMs, config:read(tx_rtm_update_interval) div 1000,
                 {update_RTMs}),
      State;
  on({update_RTMs_on_init}, State) ->
      State;
  %% accept RTM updates
  on({get_rtm_reply, InKey, InPid, InAcceptor}, State) ->
  