anchor.diff:                    SyncAccDRK1 = SyncAccDRK,
                     SyncAccDRLCount1 = SyncAccDRLCount,
                     HashCmpL_OUT = HashCmpL_IN + 1;
  -              IsLeafHash ->
  +              IsLeafHash -> % andalso Hash =:= none
                     % empty leaf hash on the other node - we can resolve
                     % this case without a trivial sub process
                     SyncAccSend1 = SyncAccSend,
  
positive.code:                   NextLvlNodesActIN, HashCmpI_IN, HashCmpL_IN) ->
      case merkle_tree:is_leaf(Node) of
          true ->
              HashCmpI_OUT = HashCmpI_IN,
              HashCmpL_OUT = HashCmpL_IN + 1;
          false ->
              HashCmpI_OUT = HashCmpI_IN + 1,
              HashCmpL_OUT = HashCmpL_IN
  
negative.code:                       RestTreeAcc, SyncAccSend, SyncAccRcv,
                        SyncAccDRK, SyncAccDRLCount, AccCmp + 1, AccSkip + Skipped,
                        NextLvlNodesActIN, HashCmpI_OUT, HashCmpL_OUT);
  merkle_cmp_result(<<?recon_fail_cont_inner:2, TR/bitstring>>, [Node | TN],
                    SigSizeI, SigSizeL,
                    MyMaxItemsCount, OtherMaxItemsCount, SyncIn, Params, Stats,
                    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,
                    RestTreeAcc, SyncAccSend, SyncAccRcv,
                    SyncAccDRK, SyncAccDRLCount, AccCmp, AccSkip,
                    NextLvlNodesActIN, HashCmpI_IN, HashCmpL_IN) ->
      ?DBG_ASSERT(merkle_tree:is_leaf(Node)),
      % leaf-inner mismatch -> this is an exact process based on the tags
      Sync = {OtherMaxItemsCount, merkle_tree:get_bucket(Node),
              merkle_tree:get_item_count(Node)},
      merkle_cmp_result(TR, TN, SigSizeI, SigSizeL,
                        MyMaxItemsCount, OtherMaxItemsCount, SyncIn, Params, Stats,
                        RestTreeAcc, [Sync | SyncAccSend], SyncAccRcv,
                        SyncAccDRK, SyncAccDRLCount, AccCmp + 1, AccSkip,
                        NextLvlNodesActIN, HashCmpI_IN, HashCmpL_IN);
  merkle_cmp_result(<<?recon_fail_stop_leaf:2, TR/bitstring>>, [Node | TN],
                    SigSizeI, SigSizeL,
                    MyMaxItemsCount, OtherMaxItemsCount, MerkleSyncIn, Params, Stats,
  