anchor.diff:      %% Store transaction.
       true = ets:insert(?MODULE, {Id, Transaction}),
   
  +    %% Set transaction timer.
  +    erlang:send_after(1000, self(), {timeout, Id}),
  +
       %% Send prepare message to all participants including ourself.
       lists:foreach(fun(N) ->
           lager:info("~p: sending prepare message to node ~p: ~p", [node(), N, Message]),
  
positive.code: 
  %% @doc Broadcast.
  broadcast(ServerRef, Message) ->
      gen_server:call(?MODULE, {broadcast, ServerRef, Message}, ?TIMEOUT).
  
  %% @doc Membership update.
  update(LocalState0) ->
  
negative.code: 
  %% NOTE: This protocol doesn't cover durability nor recovery. It's merely
  %% here for demonstration purposes.
  %% TODO: Handle abort message at participants.
  %% TODO: Handle durability at participants.
  
  -module(lampson_2pc).
  
  