anchor.diff:         IsLeafNode ->
              if IsLeafHash andalso Hash =/= none ->
                     % leaf mismatch (our node may be empty)
  +                  % distinguish the case where this node is empty which is exact, too!
  +                  case merkle_tree:is_empty(Node) of
  +                      true  -> ResultCode = ?recon_fail_cont_inner,
  +                               HashCmpL_OUT = HashCmpL_IN;
  +                      false -> ResultCode = ?recon_fail_stop_leaf,
  +                               HashCmpL_OUT = HashCmpL_IN + 1
  +                  end,
                     SyncAccSend1 =
                         [{erlang:min(Params#merkle_params.bucket_size,
                                      OtherMaxItemsCount), merkle_tree:get_bucket(Node),
                           merkle_tree:get_item_count(Node)} | SyncAccSend],
                     SyncAccDRK1 = SyncAccDRK,
  -                  SyncAccDRLCount1 = SyncAccDRLCount,
  -                  HashCmpL_OUT = HashCmpL_IN + 1;
  +                  SyncAccDRLCount1 = SyncAccDRLCount;
                 IsLeafHash -> % andalso Hash =:= none
                     % empty leaf hash on the other node - we can resolve
                     % this case without a trivial sub process
  +                  ResultCode = ?recon_fail_stop_leaf,
                     SyncAccSend1 = SyncAccSend,
                     SyncAccDRK1 =
                         [element(1, X) || X <- merkle_tree:get_bucket(Node)]
  
positive.code:                   RestTreeAcc, SyncAccSend, SyncAccRcv,
                    SyncAccDRK, SyncAccDRLCount, AccCmp, AccSkip,
                    NextLvlNodesActIN, HashCmpI_IN, HashCmpL_IN) ->
      % inner hash on both nodes
      ?DBG_ASSERT(not merkle_tree:is_leaf(Node)),
      Childs = merkle_tree:get_childs(Node),
      NextLvlNodesActOUT = NextLvlNodesActIN + Params#merkle_params.branch_factor,
      merkle_cmp_result(TR, TN, SigSizeI, SigSizeL,
                        MyMaxItemsCount, OtherMaxItemsCount, SyncIn, Params, Stats,
                        lists:reverse(Childs, RestTreeAcc), SyncAccSend, SyncAccRcv,
                        SyncAccDRK, SyncAccDRLCount, AccCmp + 1, AccSkip,
                        NextLvlNodesActOUT, HashCmpI_IN + 1, HashCmpL_IN);
  merkle_cmp_result(<<?recon_fail_stop_inner:2, TR/bitstring>>, [Node | TN],
                    SigSizeI, SigSizeL,
                    MyMaxItemsCount, OtherMaxItemsCount, SyncIn, Params, Stats,
  
negative.code:             HashCmpL_OUT = HashCmpL_IN
      end,
      merkle_cmp_result(TR, TN, SigSizeI, SigSizeL,
                        MyMaxItemsCount, OtherMaxItemsCount, SyncIn, Params, Stats,
                        RestTreeAcc, SyncAccSend, SyncAccRcv1,
                        SyncAccDRK, SyncAccDRLCount1, AccCmp + 1, AccSkip,
                        NextLvlNodesActIN, HashCmpI_IN, HashCmpL_OUT).
  