anchor.diff:      %% Find transaction record.
       case ets:lookup(?COORDINATING_TRANSACTIONS, Id) of 
           [{_Id, #transaction{participants=Participants, committed=Committed0} = Transaction}] ->
  -            lager:info("Received commit_ack from node ~p", [FromNode]),
  +            lager:info("Received commit_ack from node ~p at node: ~p", [FromNode, node()]),
   
               %% Update committed.
               Committed = lists:usort(Committed0 ++ [FromNode]),
  
positive.code: 
      {noreply, State};
  handle_info({commit, #transaction{id=Id, coordinator=Coordinator, server_ref=ServerRef, message=Message} = Transaction}, State) ->
      %% Write log record showing commit occurred.
      true = ets:insert(?PARTICIPATING_TRANSACTIONS, {Id, Transaction#transaction{participant_status=commit}}),
  
  
negative.code: %% Incoming messages.
  handle_info({participant_timeout, Id}, State) ->
      %% Find transaction record.
      case ets:lookup(?PARTICIPATING_TRANSACTIONS, Id) of 
          [{_Id, #transaction{participants=_Participants, participant_status=ParticipantStatus, server_ref=ServerRef, message=Message} = Transaction}] ->
              lager:info("Participant timeout when participant ~p was in the ~p state.", [node(), ParticipantStatus]),
  
              case ParticipantStatus of 
                  prepared ->
                      lager:info("Participant: ~p moving from ~p to abort state.", [node(), ParticipantStatus]),
  
                      %% Write log record showing abort occurred.
                      true = ets:insert(?PARTICIPATING_TRANSACTIONS, {Id, Transaction#transaction{participant_status=abort}});
                  precommit ->
                      lager:info("Participant: ~p moving from precommit to commit state.", [node()]),
  
                      %% Proceed with the commit.
  
                      %% Write log record showing commit occurred.
                      true = ets:insert(?PARTICIPATING_TRANSACTIONS, {Id, Transaction#transaction{participant_status=commit}}),
  
                      %% Forward to process.
                      partisan_util:process_forward(ServerRef, Message);
                  commit -> 
                      lager:info("Participant: ~p already committed.", [node()]),
                      ok
              end;
          [] ->
              lager:error("Notification for participant timeout message but no transaction found: abort or commit already occurred!")
      end,
  
      {noreply, State};
  handle_info({coordinator_timeout, Id}, State) ->
      %% Find transaction record.
      case ets:lookup(?COORDINATING_TRANSACTIONS, Id) of 
          [{_Id, #transaction{coordinator_status=CoordinatorStatus, participants=Participants, from=From} = Transaction0}] ->
              lager:info("Coordinator timeout when participant ~p was in the ~p state.", [node(), CoordinatorStatus]),
  
              case CoordinatorStatus of 
                  commit_authorized ->
                      lager:info("Coordinator ~p in commit_authorized state, moving to abort.", [node()]),
  
                      %% Update local state.
                      Transaction = Transaction0#transaction{coordinator_status=aborting},
                      true = ets:insert(?COORDINATING_TRANSACTIONS, {Id, Transaction}),
  
                      %% Reply to caller.
                      lager:info("Aborting transaction: ~p", [Id]),
                      partisan_pluggable_peer_service_manager:forward_message(From, error),
  
                      %% Send notification to abort.
                      lists:foreach(fun(N) ->
                          lager:info("~p: sending abort message to node ~p: ~p", [node(), N, Id]),
                          partisan_pluggable_peer_service_manager:forward_message(N, undefined, ?MODULE, {abort, Transaction}, [])
                      end, membership(Participants)),
  
                      ok;
                  commit_finalizing ->
                      lager:info("Coordinator ~p in commit_finalizing state, moving to abort.", [node()]),
  
                      %% Update local state.
                      Transaction = Transaction0#transaction{coordinator_status=aborting},
                      true = ets:insert(?COORDINATING_TRANSACTIONS, {Id, Transaction}),
  
                      %% Reply to caller.
                      lager:info("Aborting transaction: ~p", [Id]),
                      partisan_pluggable_peer_service_manager:forward_message(From, error),
  
                      %% Send notification to abort.
                      lists:foreach(fun(N) ->
                          lager:info("~p: sending abort message to node ~p: ~p", [node(), N, Id]),
                          partisan_pluggable_peer_service_manager:forward_message(N, undefined, ?MODULE, {abort, Transaction}, [])
                      end, membership(Participants)),
  
                      %% Can't do anything; block.
                      ok;
                  aborting ->
                      lager:info("Coordinator ~p in abort state already.", [node()]),
  
                      %% Can't do anything; block.
                      ok;
                  preparing ->
                      lager:info("Coordinator: ~p moving from preparing to abort state.", [node()]),
  
                      %% Update local state.
                      Transaction = Transaction0#transaction{coordinator_status=aborting},
  