anchor.diff:  
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   
  --spec build_recon_struct(method(), intervals:non_empty_interval(), db_chunk_enc())
  +-spec build_recon_struct(method(), OldSyncStruct::sync_struct() | {},
  +                         intervals:non_empty_interval(), db_chunk_enc())
           -> sync_struct().
  -build_recon_struct(bloom, I, DBItems) ->
  +build_recon_struct(bloom, _OldSyncStruct = {}, I, DBItems) ->
       ?ASSERT(not intervals:is_empty(I)),
       Fpr = get_bloom_fpr(),
       ElementNum = length(DBItems),
       HFCount = bloom:calc_HF_numEx(ElementNum, Fpr),
       BF = ?REP_BLOOM:new(ElementNum, Fpr, ?REP_HFS:new(HFCount), DBItems),
       #bloom_recon_struct{ interval = I, bloom = BF };
  -build_recon_struct(merkle_tree, I, DBItems) ->
  +build_recon_struct(merkle_tree, _OldSyncStruct = {}, I, DBItems) ->
       ?ASSERT(not intervals:is_empty(I)),
       merkle_tree:new(I, DBItems, [{branch_factor, get_merkle_branch_factor()},
                                    {bucket_size, get_merkle_bucket_size()}]);
  -build_recon_struct(art, I, DBItems) ->
  +build_recon_struct(merkle_tree, OldSyncStruct, _I, DBItems) ->
  +    ?ASSERT(not intervals:is_empty(_I)),
  +    ?ASSERT(merkle_tree:is_merkle_tree(OldSyncStruct)),
  +    NTree = merkle_tree:insert_list(DBItems, OldSyncStruct),
  +    merkle_tree:gen_hash(NTree);
  +build_recon_struct(art, _OldSyncStruct = {}, I, DBItems) ->
       ?ASSERT(not intervals:is_empty(I)),
       Branch = get_merkle_branch_factor(),
       BucketSize = merkle_tree:get_opt_bucket_size(length(DBItems), Branch, 1),
  
positive.code: -spec build_struct(DBList::db_chunk_enc(), DestI::intervals:non_empty_interval(),
                     RestI::intervals:interval(), state()) -> state() | kill.
  build_struct(DBList, DestI, RestI,
               State = #rr_recon_state{method = RMethod, struct = Params,
                                       initiator = Initiator, stats = Stats,
                                       dhtNodePid = DhtNodePid, stage = Stage}) ->
      ?ASSERT(not intervals:is_empty(DestI)),
      {BuildTime, SyncStruct} =
          case merkle_tree:is_merkle_tree(Params) of
              true ->
                  {BTime, NTree} = util:tc(merkle_tree, insert_list, [DBList, Params]),
                  {BTime, merkle_tree:gen_hash(NTree) };
              false ->
                  ToBuild = ?IIF(RMethod =:= art, ?IIF(Initiator, merkle_tree, art), RMethod),
                  util:tc(fun() -> build_recon_struct(ToBuild, DestI, DBList) end)
          end,
      Stats1 = rr_recon_stats:inc([{build_time, BuildTime}], Stats),
      NewState = State#rr_recon_state{struct = SyncStruct, stats = Stats1},
      EmptyRest = intervals:is_empty(RestI),
  
negative.code: 
  on({reconcile, {get_chunk_response, {RestI, DBList0}}} = _Msg,
     State = #rr_recon_state{stage = reconciliation,     initiator = true,
                             method = RMethod,           params = Params})
    when RMethod =:= merkle_tree orelse RMethod =:= art->
      ?TRACE1(_Msg, State),
      % no need to map keys since the other node's bloom filter was created with
      % keys mapped to our interval
      DBList = [encodeBlob(KeyX, VersionX) || {KeyX, VersionX} <- DBList0],
      MySyncI = case RMethod of
                    merkle_tree -> Params#merkle_params.interval;
                    art         -> art:get_interval(Params)
                end,
      build_struct(DBList, MySyncI, RestI, State);
  
  