anchor.diff:          {error, Reason} ->
               lager:error("Failed to establish connection to Riak. Reason: ~p",
                           [Reason]),
  -            {stop, riak_connect_failed}
  +            {stop, riak_connect_failed, State}
       end.
   
   %% This clause is for adding a new
  
positive.code: %% with a particular UUID, update_manifest
  %% should be used from then on out.
  waiting_command({add_new_manifest, _Manifest}, State) ->
      {next_state, waiting_update_command, State}.
  
  waiting_update_command({update_manifest, _Manifest}, State) ->
      {next_state, waiting_update_command, State};
  waiting_update_command(stop, State) ->
      {stop, normal, State}.
  
  
  
negative.code: %%% Internal functions
  %%%===================================================================
  
  %% @doc
  -spec get_manifests(pid(), binary(), binary()) ->
      {ok, term(), term()} | {error, notfound}.
  get_manifests(RiakcPid, Bucket, Key) ->
      ManifestBucket = riak_moss_utils:to_bucket_name(objects, Bucket),
      case riakc_pb_socket:get(RiakcPid, ManifestBucket, Key) of
          {ok, Object} ->
              Siblings = riakc_obj:get_values(Object),
              DecodedSiblings = lists:map(fun erlang:binary_to_term/1, Siblings),
              Resolved = riak_moss_manifest_resolution:resolve(DecodedSiblings),
              {ok, Object, Resolved};
          {error, notfound} ->
              {error, notfound}
      end.
  