anchor.diff:      Self = self(),
       async(Key, State, fun() -> do_overwrite_fsm(Key, Val, From, Self, State) end),
       {next_state, leading, State};
  -leading_kv({modify, Key, Current, Fun}, From, State) ->
  -    Self = self(),
  -    async(Key, State, fun() -> do_modify_fsm(Key, Current, Fun, From, State#state{self=Self}) end),
  -    {next_state, leading, State};
   leading_kv(_, _From, _State) ->
       false.
   
  
positive.code: -spec sync_failed(pid()) -> ok.
  sync_failed(Pid) when is_pid(Pid) ->
      gen_fsm:send_event(Pid, sync_failed).
  
  %%%===================================================================
  %%% K/V API
  
negative.code: following_kv({put, _Key, _Fun}=Msg, From, State) ->
      forward(Msg, From, State);
  following_kv({overwrite, _Key, _Val}=Msg, From, State) ->
      forward(Msg, From, State);
  following_kv(_, _From, _State) ->
      false.
  