anchor.diff:  %% Test cases
   %% ============================================================
   siblings_on_key_block(Config) ->
  -    MBC = ?config(micro_block_cycle, Config),
  +    ct:pal("Setting up nodes"),
       aecore_suite_utils:start_node(dev1, Config),
       aecore_suite_utils:start_node(dev2, Config),
   
  
positive.code:     aecore_suite_utils:connect(N1),
      aecore_suite_utils:connect(N2),
  
      aecore_suite_utils:mine_key_blocks(N1, 1),
  
      Account1 = #{ pubkey := PK1 } = new_keypair(),
      Account2 = #{ pubkey := PK2 } = new_keypair(),
  
      {ok, Tx0a} = add_spend_tx(N1, 100000, 1, 1, 10, patron(), PK1),
      {ok, Tx0b} = add_spend_tx(N1, 100000, 1, 2, 10, patron(), PK2),
  
      {ok, N1Blocks1} = aecore_suite_utils:mine_blocks_until_txs_on_chain(N1, [Tx0a, Tx0b], 5),
  
      {ok, _Tx1} = add_spend_tx(N1, 1000, 1,  1,  10, Account1, new_pubkey()),
  
      {ok, [Key, Micro1 | _] = N1Blocks2} = aecore_suite_utils:mine_micro_blocks(N1, 1),
  
      %% Act fraudulent on "behalf" of N1
      timer:sleep(MBC), %% adhere to micro block interval
      {ok, _Tx2} = add_spend_tx(N1, 1000, 1,  1,  10, Account2, new_pubkey()),
      {ok, Micro2, _} =  rpc:call(N1, aec_block_micro_candidate, create, [Key]),
      {ok, Micro2S} = rpc:call(N1, aec_keys, sign_micro_block, [Micro2]),
      rpc:call(N2, aec_conductor, post_block, [Micro2S]),
  
      %% Add a transaction so there will be a micro block with fraud produced
      {ok, _Tx3} = add_spend_tx(N1, 1000, 1,  3,  10),
      {ok, [_Key3, Micro3 | _] = N2Blocks} =  aecore_suite_utils:mine_micro_blocks(N2, 1),
      ct:log("Micro3: ~p", [Micro3]),
  
      %% Check that the fraud would not be reported again.
      {ok, Micro4, _} =  rpc:call(N2, aec_block_micro_candidate, create, [Micro3]),
      ?assertEqual(no_fraud, aec_blocks:pof(Micro4)),
  
      Header1 = aec_blocks:to_header(Micro1),
      Header2 = aec_blocks:to_header(Micro2S),
  
      case aec_blocks:pof(Micro3) of
          no_fraud -> error({expected_fraud, Micro3});
          PoF ->
              ?assertEqual(lists:sort([Header1, Header2]),
                           lists:sort([aec_pof:header1(PoF), aec_pof:header2(PoF)])),
              ?assertEqual(rpc:call(N1, aec_keys, pubkey, []),
                           {ok, aec_pof:pubkey(PoF)})
      end,
  
      %% One N1 key block has been mined at the beginning of the test, hence + 1.
      N1KeyBlocksCount = key_blocks_count(N1Blocks1 ++ N1Blocks2) + 1,
      N2KeyBlocksCount = key_blocks_count(N2Blocks),
  
      check_post(N1, N1KeyBlocksCount, N2, N2KeyBlocksCount),
  
      ok.
  
  siblings_on_micro_block(Config) ->
      MBC = ?config(micro_block_cycle, Config),
      aecore_suite_utils:start_node(dev1, Config),
      aecore_suite_utils:start_node(dev2, Config),
  
      N1 = aecore_suite_utils:node_name(dev1),
      N2 = aecore_suite_utils:node_name(dev2),
  
      aecore_suite_utils:connect(N1),
      aecore_suite_utils:connect(N2),
  
      aecore_suite_utils:mine_key_blocks(N1, 1),
  
      Account1 = #{ pubkey := PK1 } = new_keypair(),
      Account2 = #{ pubkey := PK2 } = new_keypair(),
  
      {ok, Tx0a} = add_spend_tx(N1, 100000, 1, 1, 10, patron(), PK1),
      {ok, Tx0b} = add_spend_tx(N1, 100000, 1, 2, 10, patron(), PK2),
  
      {ok, N1Blocks1} = aecore_suite_utils:mine_blocks_until_txs_on_chain(N1, [Tx0a, Tx0b], 5),
  
      {ok, _Tx1} = add_spend_tx(N1, 1000, 1,  3, 10),
  
      {ok, [_Key, Micro0 | _] = N1Blocks2} = aecore_suite_utils:mine_micro_blocks(N1, 1),
  
      %% Act fraudulent on "behalf" of N1
      timer:sleep(MBC), %% adhere to micro block interval
      {ok, _Tx2} = add_spend_tx(N1, 1000, 1,  1,  10, Account1, new_pubkey()),
      {ok, Micro1, _} =  rpc:call(N1, aec_block_micro_candidate, create, [Micro0]),
      {ok, Micro1S} = rpc:call(N1, aec_keys, sign_micro_block, [Micro1]),
      timer:sleep(MBC), %% adhere to micro block interval
      {ok, _Tx3} = add_spend_tx(N1, 1000, 1,  1,  10, Account2, new_pubkey()),
      {ok, Micro2, _} =  rpc:call(N1, aec_block_micro_candidate, create, [Micro0]),
      {ok, Micro2S} = rpc:call(N1, aec_keys, sign_micro_block, [Micro2]),
  
      rpc:call(N2, aec_conductor, post_block, [Micro1S]),
      rpc:call(N2, aec_conductor, post_block, [Micro2S]),
  
      %% Add a transaction so there will be a micro block with fraud produced
      {ok, _Tx4} = add_spend_tx(N1, 1000, 1,  4, 10),
      {ok, [_Key3, Micro3|_] = N2Blocks} =  aecore_suite_utils:mine_micro_blocks(N2, 1),
      ct:log("Micro3: ~p", [Micro3]),
  
      %% Check that the fraud would not be reported again.
      {ok, Micro4, _} =  rpc:call(N2, aec_block_micro_candidate, create, [Micro3]),
      ?assertEqual(no_fraud, aec_blocks:pof(Micro4)),
  
      Header1 = aec_blocks:to_header(Micro1S),
      Header2 = aec_blocks:to_header(Micro2S),
  
      case aec_blocks:pof(Micro3) of
          no_fraud -> error({expected_fraud, Micro3});
          PoF ->
              ?assertEqual(lists:sort([Header1, Header2]),
                           lists:sort([aec_pof:header1(PoF), aec_pof:header2(PoF)])),
              ?assertEqual(rpc:call(N1, aec_keys, pubkey, []),
                           {ok, aec_pof:pubkey(PoF)})
      end,
  
      %% One N1 key block has been mined at the beginning of the test, hence + 1.
      N1KeyBlocksCount = key_blocks_count(N1Blocks1 ++ N1Blocks2) + 1,
      N2KeyBlocksCount = key_blocks_count(N2Blocks),
  
      check_post(N1, N1KeyBlocksCount, N2, N2KeyBlocksCount),
  
      ok.
  
  check_post(N1, N1KeyBlocksCount, N2, N2KeyBlocksCount0) ->
      B1 = <<217,202,108,173,192,99,13,10,129,124,71,86,232,121,148,177,243,254,160,88,174,204,22,114,15,42,51,71,75,19,135,16>>,
      B2 = <<40,25,191,50,209,111,19,239,98,126,125,211,15,133,93,12,13,125,167,137,94,138,27,55,23,50,106,33,28,222,180,102>>,
  
      %% Check the rewards
      aecore_suite_utils:mine_key_blocks(N2, 2),
      N2KeyBlocksCount = N2KeyBlocksCount0 + 2,
  
      {value, Acc1} = rpc:call(N2, aec_chain, get_account, [B1]),
      {value, Acc2} = rpc:call(N2, aec_chain, get_account, [B2]),
      ct:log("Balances: ~p and ~p", [Acc1, Acc2]),
  
negative.code: %% ============================================================
  %% Helpers
  %% ============================================================
  add_spend_tx(Node, Amount, Fee, Nonce, TTL, Sender, Recipient) ->
      SenderId = aec_id:create(account, maps:get(pubkey, Sender)),
      RecipientId = aec_id:create(account, Recipient),
  