anchor.diff:      KeyBlock = wait_for_block_created(),
       assert_leader(true),
       assert_generation_state(running),
  +    wait_for_top_block_hash(block_hash(KeyBlock)),
   
       ok = aec_tx_pool:push(tx(Keys)),
  -
       MicroBlock = wait_for_micro_block_created(),
  -    {ok, KeyHash} = aec_blocks:hash_internal_representation(KeyBlock),
  -    ?assertEqual(KeyHash, aec_blocks:prev_key_hash(MicroBlock)),
  +    wait_for_top_block_hash(block_hash(MicroBlock)),
  +
  +    ok = prev_on_chain(MicroBlock, KeyBlock),
       ok.
   
   test_two_mined_block_signing() ->
  
positive.code:                                   ttl => 0,
                                    payload => <<"">>}),
      aec_test_utils:sign_tx(Tx, Priv).
  
  assert_stopped() ->
      ?assertEqual(stopped, ?TEST_MODULE:get_mining_state()).
  
negative.code:     ?assertEqual(ok, ?TEST_MODULE:post_block(KB1)),
  
      KB1 = wait_for_block_to_publish(),
      assert_leader(true),
      assert_generation_state(running),
      wait_for_top_block_hash(block_hash(KB1)),
      ?assertEqual(true, aec_blocks:is_key_block(KB1)),
  
      %% Single tx should trigger micro block
      ok = aec_tx_pool:push(tx(Keys)),
  
      NewBlock = wait_for_block_to_publish(),
      wait_for_top_block_hash(block_hash(NewBlock)),
      ?assertEqual(false, aec_blocks:is_key_block(NewBlock)),
  
      ok = prev_on_chain(NewBlock, KB1),
      ok.
  
  %%%===================================================================
  