anchor.diff:      SrcPidReply = comm:reply_as(SrcPid, 3, {create_struct2, DestI, '_'}),
       send_local(DhtPid,
                  {get_chunk, SrcPidReply, I, fun get_chunk_filter/1,
  -                fun get_chunk_kv/1, MaxItems});
  -send_chunk_req(DhtPid, SrcPid, I, _DestI, MaxItems, resolve) ->
  -    ?DBG_ASSERT(I =:= _DestI),
  -    SrcPidReply = comm:reply_as(SrcPid, 2, {resolve, '_'}),
  -    send_local(DhtPid,
  -               {get_chunk, SrcPidReply, I, fun get_chunk_filter/1,
  -                fun get_chunk_kvv/1, MaxItems}).
  +                fun get_chunk_kv/1, MaxItems}).
   
   -spec get_chunk_filter(db_entry:entry()) -> boolean().
   get_chunk_filter(DBEntry) -> db_entry:get_version(DBEntry) =/= -1.
   -spec get_chunk_kv(db_entry:entry()) -> {?RT:key(), client_version() | -1}.
   get_chunk_kv(DBEntry) -> {db_entry:get_key(DBEntry), db_entry:get_version(DBEntry)}.
  --spec get_chunk_kvv(db_entry:entry()) -> {?RT:key(), client_version() | -1, db_dht:value()}.
  -get_chunk_kvv(DBEntry) -> {db_entry:get_key(DBEntry), db_entry:get_version(DBEntry), db_entry:get_value(DBEntry)}.
   
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   
  
positive.code:                           sync_finished_remote. %client-side shutdown by merkle-tree recon initiator
  
  -type db_chunk_kv()    :: [{?RT:key(), client_version()}].
  -type 'db_chunk_kv+'() :: [{?RT:key(), client_version()},...].
  -type db_chunk_kvv()   :: [{?RT:key(), client_version(), db_dht:value()}].
  -type 'db_chunk_kvv+'():: [{?RT:key(), client_version(), db_dht:value()},...].
  
  -type signature_size() :: 0..160. % use an upper bound of 160 (SHA-1) to limit automatic testing
  -type kvi_tree()       :: gb_trees:tree(KeyBin::bitstring(), {VersionShort::non_neg_integer(), Idx::non_neg_integer()}).
  
negative.code: -export([map_key_to_interval/2, map_key_to_quadrant/2, map_rkeys_to_quadrant/2,
           map_interval/2,
           quadrant_intervals/0]).
  -export([get_chunk_kv/1, get_chunk_filter/1]).
  %-export([compress_kv_list/4, calc_signature_size_nm_pair/4]).
  
  %export for testing
  