anchor.diff:                        updated_partitions=Updated_partitions}) ->
       case Op_type of
           prepare ->
  -            {next_state, prepare, SD0#state{from=Sender}, 0};
  +            case Args of
  +            two_phase ->
  +                {next_state, prepare_2pc, SD0#state{from=Sender, commit_protocol=Args}, 0};
  +            _ ->
  +                {next_state, prepare, SD0#state{from=Sender, commit_protocol=Args}, 0}
  +            end;
           read ->
               {Key, Type}=Args,
               Preflist = log_utilities:get_preflist_from_key(Key),
  
positive.code:          handle_sync_event/4, terminate/3]).
  
  %% States
  -export([execute_op/3, finish_op/3, prepare/2,
           receive_prepared/2, single_committing/2, committing/3, receive_committed/2, abort/2,
           reply_to_client/2]).
  
  %%---------------------------------------------------------------------
  
negative.code:              SD0#state{num_to_ack=NumToAck, from=Sender, state=committing}}
      end.
  
  %% @doc after receiving all prepare_times, send the commit message to all
  %%      updated partitions, and go to the "receive_committed" state.
  %%      This state is used when no commit message from the client is
  %%      expected 
  committing(timeout, SD0=#state{transaction = Transaction,
                                updated_partitions=Updated_partitions,
                                commit_time=Commit_time}) ->
      NumToAck=length(Updated_partitions),
      case NumToAck of
          0 ->
              {next_state, reply_to_client,
               SD0#state{state=committed},0};
          _ ->
              clocksi_vnode:commit(Updated_partitions, Transaction, Commit_time),
              {next_state, receive_committed,
               SD0#state{num_to_ack=NumToAck, state=committing}}
      end.
  
  %% @doc the fsm waits for acks indicating that each partition has successfully
  
  %% @doc the fsm waits for acks indicating that each partition has successfully
  %%	committed the tx and finishes operation.
  