anchor.diff:  top_hash(State) ->
       get_bucket(1, 0, State).
   
  --spec local_compare(hashtree(), hashtree()) -> [keydiff()].
  -local_compare(T1, T2) ->
  -    Remote = fun(get_bucket, {L, B}) ->
  -                     get_bucket(L, B, T2);
  -                (key_hashes, Segment) ->
  -                     [{_, KeyHashes2}] = key_hashes(T2, Segment),
  -                     KeyHashes2
  -             end,
  -    compare(T1, Remote).
  -
  --spec compare(hashtree(), remote_fun()) -> [keydiff()].
  -compare(Tree, Remote) ->
  -    compare(Tree, Remote, fun(Keys, KeyAcc) ->
  -                                  Keys ++ KeyAcc
  -                          end).
  -
  --spec compare(hashtree(), remote_fun(), acc_fun(X)) -> X.
  -compare(Tree, Remote, AccFun) ->
  -    compare(1, 0, Tree, Remote, AccFun, []).
  +compare(Tree, Remote, AccFun, Acc) ->
  +    compare(1, 0, Tree, Remote, AccFun, Acc).
   
   -spec levels(hashtree()) -> pos_integer().
   levels(#state{levels=L}) ->
  
positive.code: %% to LevelDB using a single batch write. Writes are flushed whenever the
  %% buffer becomes full, as well as before updating the hashtree.
  %%
  %% Tree exchange is provided by the ``compare/2'' and ``compare/3'' functions.
  %% The behavior of these functions is determined through a provided function
  %% that implements logic to get buckets and segments for a given remote tree,
  %% as well as a callback invoked as key differences are determined. This
  %% generic interface allows for tree exchange to be implemented in a variety
  %% of ways, including directly against to local hash tree instances, over
  %% distributed Erlang, or over a custom protocol over a TCP socket. See
  %% ``local_compare/2'' and ``do_remote/1'' for examples.
  
  -module(hashtree).
  
  
negative.code:          destroy/1,
           read_meta/2,
           write_meta/3,
           compare/4,
           top_hash/1,
           get_bucket/3,
           key_hashes/2,
  