anchor.diff:             end,
              merkle_check_node(TK, TN, SigSizeI, SigSizeL,
                                MyMaxItemsCount, OtherMaxItemsCount, Params, Stats,
  -                             <<FlagsAcc/bitstring, ?recon_fail_stop_leaf:2>>, RestTreeAcc,
  +                             <<FlagsAcc/bitstring, ResultCode:2>>, RestTreeAcc,
                                SyncAccSend1, SyncAccRcv,
                                SyncAccDRK1, SyncAccDRLCount1,
                                SyncIN, AccCmp + 1, AccSkip,
  
positive.code:        IsLeafNode ->
             if IsLeafHash andalso Hash =/= none ->
                    % leaf mismatch (our node may be empty)
                    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;
                IsLeafHash -> % andalso Hash =:= none
                    % empty leaf hash on the other node - we can resolve
                    % this case without a trivial sub process
                    SyncAccSend1 = SyncAccSend,
                    SyncAccDRK1 =
                        [element(1, X) || X <- merkle_tree:get_bucket(Node)]
  
negative.code:                   RestTreeAcc, SyncAccSend, SyncAccRcv,
                    SyncAccDRK, SyncAccDRLCount, AccCmp, AccSkip,
                    NextLvlNodesActIN, HashCmpI_IN, HashCmpL_IN) ->
      case merkle_tree:is_leaf(Node) of
          true ->
              ?DBG_ASSERT(not merkle_tree:is_empty(Node)),
              % non-empty leaf on this node, empty leaf on the other node
              % this will increase HashCmpL although the process is exact
              % -> simply remove 1 and to remain at the same count!
              merkle_cmp_result(
                <<?recon_fail_stop_leaf:2, TR/bitstring>>, [Node | TN],
                SigSizeI, SigSizeL,
                MyMaxItemsCount, OtherMaxItemsCount, SyncIn, Params, Stats,
                RestTreeAcc, SyncAccSend, SyncAccRcv,
                SyncAccDRK, SyncAccDRLCount, AccCmp, AccSkip,
                NextLvlNodesActIN, HashCmpI_IN, HashCmpL_IN - 1);
          false ->
              % inner hash on both nodes
              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)
      end;
  merkle_cmp_result(<<?recon_fail_stop_inner:2, TR/bitstring>>, [Node | TN],
                    SigSizeI, SigSizeL,
                    MyMaxItemsCount, OtherMaxItemsCount, SyncIn, Params, Stats,
  