anchor.diff:  -export([start_link/1]).
   -export([init/1, handle_event/3, handle_sync_event/4,
            handle_info/3, terminate/3, code_change/4]).
  --export([active/2,merk_waiting/2,waiting_diffobjs/2]).
  --export([active/3,merk_waiting/3,waiting_diffobjs/3]).
  +-export([active/2,active/3]).
   
   -define(TIMEOUT, 60000).
   
  --record(state, {idx,mapcache,mod,modstate,waiting_diffobjs}).
  -
  -start_link(Idx) ->
  -    gen_fsm:start_link(?MODULE, [Idx], []).
  +-record(state, {idx,mapcache,mod,modstate}).
  +
  +start_link(Idx) -> gen_fsm:start_link(?MODULE, [Idx], []).
   
   init([VNodeIndex]) ->
       Mod = riak:get_app_env(storage_backend),
  
positive.code: code_change(_OldVsn, StateName, State, _Extra) -> {ok, StateName, State}.
  
  %% @private
  handle_event({get_merkle, From}, StateName, State) ->
      gen_server2:reply(From, get_merkle(State)),
      {next_state, StateName, State, ?TIMEOUT};
  handle_event({get_vclocks, From, KeyList}, StateName, State) ->
      gen_server2:reply(From, get_vclocks(KeyList, State)),
      {next_state, StateName, State, ?TIMEOUT};
  
negative.code:     end,
      KeyCache = orddict:store({M,F,Arg,KeyData},MF_Res,KeyCache0),
      {next_state,active,
       StateData#state{mapcache=orddict:store(BKey,KeyCache,Cache)},?TIMEOUT}.
  
  %% @private
  do_get(FSM_pid, BKey, ReqID,
  