anchor.diff:      disconnect_node(net2_node1, net1, Cfg),
       disconnect_node(net2_node2, net1, Cfg),
   
  -    wait_for_value({height, Top2 + Length}, Nodes, Length * ?MINING_TIMEOUT, Cfg),
  -
  -    C1 = get_block(net1_node1, Top2 + Length),
  -    C2 = get_block(net1_node2, Top2 + Length),
  -    C3 = get_block(net2_node1, Top2 + Length),
  -    C4 = get_block(net2_node2, Top2 + Length),
  +    TargetHeight3 = Top2 + Length,
  +    %% Wait for one extra block for resolving potential fork caused by nodes mining distinct blocks at the same time.
  +    MinedHeight3 = 1 + TargetHeight3,
  +    wait_for_value({height, MinedHeight3}, Nodes, (1 + Length) * ?MINING_TIMEOUT, Cfg),
  +
  +    C1 = get_block(net1_node1, TargetHeight3),
  +    C2 = get_block(net1_node2, TargetHeight3),
  +    C3 = get_block(net2_node1, TargetHeight3),
  +    C4 = get_block(net2_node2, TargetHeight3),
   
       %% Check the the chains forked
       ?assertEqual(C1, C2),
  
positive.code:     start_node(net2_node2, Cfg),
  
      %% Starts with a net split
  
      wait_for_value({height, Length}, Nodes, Length * ?MINING_TIMEOUT, Cfg),
  
      A1 = get_block(net1_node1, Length),
      A2 = get_block(net1_node2, Length),
      A3 = get_block(net2_node1, Length),
      A4 = get_block(net2_node2, Length),
  
      %% Check that the chains are different
      ?assertEqual(A1, A2),
  
negative.code:     connect_node(net2_node2, net1, Cfg),
      T1 = erlang:system_time(millisecond),
  
      TargetHeight4 = MinedHeight3 + Length,
      %% Wait for one extra block for resolving potential fork caused by nodes mining distinct blocks at the same time.
      wait_for_value({height, 1 + TargetHeight4}, Nodes, (1 + Length) * ?MINING_TIMEOUT, Cfg),
  
      try_until(T1 + 2 * ping_interval(),
              fun() ->
                D1 = get_block(net1_node1, TargetHeight4),
                D2 = get_block(net1_node2, TargetHeight4),
                D3 = get_block(net2_node1, TargetHeight4),
                D4 = get_block(net2_node2, TargetHeight4),
  
                %% Check the chain merged again
                ?assertEqual(D1, D2),
  