anchor.diff:        From ! {pongGGT, maps:get(ggtname, State)};
       kill -> exit(self(), normal), ok
     end,
  -  receive_loop(State).
  +  handle_messages(State).
   
   
   %% Starts the ggT Process and registers at the coordinator, nameservice and locally at the node
  
positive.code:     true -> State
    end.
  
  receive_loop(State) ->
    receive
    % Sets the right and left neighbour processes for the recursive algorithm
      {setneighbors, LeftNeighbour, RightNeighbour} ->
        receive_loop(update_neighbours(LeftNeighbour, RightNeighbour, State));
    % Sets a new Mi to calculate
      {setpm, NewMi} ->
        receive_loop(set_pm(NewMi, State));
    % The heart of the recursive algorithm
      {sendy, Y} ->
        receive_loop(maybe_update_mi(Y, State));
    % TODO Wahlnachricht für die Terminierung der aktuellen Berechnung;
    % TODO Initiator ist der Initiator dieser Wahl (Name des ggT-Prozesses, keine PID!) und From (ist PID) ist sein Absender.
      {_From, {vote, _Initiator}} -> ok;
  
negative.code:   end,
    Coordinator ! {hello, GgTName},
    log(State, ["registered at coordinator"]),
    handle_messages(State).
  
  update_mi_state(State) ->
    maps:update(lastMiUpdate, erlang:now(), State).
  