anchor.diff:                          merkle_tree:keys_to_intervals(
                             DBItems, intervals:split(MerkleI, NumTrees))
                   end),
  -    ItemCount = lists:max([0 | [Count || {_SubI, Count, _Bucket} <- ICBList]]),
  +    ItemCount = lists:sum([Count || {_SubI, Count, _Bucket} <- ICBList]),
  +    MaxItemCount = lists:max([0 | [Count || {_SubI, Count, _Bucket} <- ICBList]]),
       FRTotal_p1_perNode = calc_n_subparts_FR(NumTrees, FRTotal_p1),
       
       MySyncParams = #merkle_params{exp_delta = get_max_expected_delta(),
  
positive.code:                          MyItemCount, OtherItemsCount, ExpDelta),
      
      {_FR_I, _FR_L, NextSigSizeI, NextSigSizeL, EffectiveFr_I, EffectiveFr_L} =
          merkle_next_signature_sizes(Params, FRTotal_p1_perNode, MyItemCount,
                                      OtherItemsCount, MaxAffectedItems),
      
      Req = merkle_compress_hashlist(MySyncStruct, <<>>, NextSigSizeI, NextSigSizeL),
      send(DestReconPid, {?check_nodes, comm:this(), Req, MyItemCount}),
      State#rr_recon_state{stats = Stats1,
                           misc = [{signature_size, {NextSigSizeI, NextSigSizeL}},
                                   {max_affected_items, MaxAffectedItems},
                                   {fail_rate_target_per_node, {EffectiveFr_I, EffectiveFr_L}},
                                   {fail_rate_target_phase1, FRTotal_p1},
                                   {prev_used_fr, {0.0, 0.0}},
                                   {icount, MyItemCount},
                                   {oicount, OtherItemsCount}],
                           kv_list = []};
  begin_sync(State = #rr_recon_state{method = art, params = {}, initiator = false,
                                     struct = MySyncStruct,
  
negative.code: %% merkle tree sync messages
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  on({?check_nodes, SenderPid, ToCheck, OtherItemsCount, OtherMaxItemsCount},
     State = #rr_recon_state{params = #merkle_params{exp_delta = ExpDelta},
                             misc = [{fail_rate_target_per_node, LastFRPerNode},
                                     {fail_rate_target_phase1, FR_p1},
                                     {prev_used_fr, PrevUsedFr},
                                     {icount, MyMaxItemCount},
                                     {total_icount, MyItemCount}]}) ->
      % this is the first check_nodes message from the initiator and we finally
      % learn about the exact number of items to synchronise with
      MaxAffectedItems = calc_max_different_items_total(
                           MyItemCount, OtherItemsCount, ExpDelta),
      on({?check_nodes, ToCheck, OtherMaxItemsCount},
         State#rr_recon_state{dest_recon_pid = SenderPid,
                              misc = [{max_affected_items, MaxAffectedItems},
                                      {fail_rate_target_per_node, LastFRPerNode},
                                      {fail_rate_target_phase1, FR_p1},
                                      {prev_used_fr, PrevUsedFr},
                                      {icount, MyMaxItemCount}]});
  
  on({?check_nodes, ToCheck0, OtherMaxItemsCount},
     State = #rr_recon_state{stage = reconciliation,    initiator = false,
  