anchor.diff:      NewState = state_from_block_written(BlockID, WriterPid, State),
       case ordsets:size(NewState#state.unacked_writes) of
           0 ->
  -            {next_state, done, NewState};
  +            case State#state.reply_pid of
  +                undefined ->
  +                    {next_state, done, NewState};
  +                ReplyPid ->
  +                    %% reply with the final
  +                    %% manifest
  +                    %% TODO:
  +                    %% The reply shouldn't
  +                    %% be 'ok', it should
  +                    %% be the final manifest
  +                    gen_fsm:reply(ReplyPid, ok),
  +                    {stop, normal, NewState}
  +            end;
           _ ->
               {next_state, all_received, NewState}
       end.
  
positive.code:                                                   remainder_data=NewRemainderData2,
                                                    num_bytes_received=UpdatedBytesReceived}),
  
      {noreply, full, NewStateData#state{reply_pid=From}}.
  
  handle_receiving_last_chunk(NewData, State=#state{buffer_queue=BufferQueue,
                                                    remainder_data=RemainderData,
  
negative.code:             handle_receiving_last_chunk(NewData, State)
      end.
  
  all_received(finalize, From, State) ->
      %% 1. stash the From pid into our
      %%    state so that we know to reply
      %%    later with the finished manifest
      {next_state, all_received, State#state{reply_pid=From}}.
  
  done(finalize, _From, State) ->
      %% 1. reply immediately
  