diff --git a/apps/explorer/test/explorer/chain/import/runner/blocks_test.exs b/apps/explorer/test/explorer/chain/import/runner/blocks_test.exs index c47204e749..5eaaca5344 100644 --- a/apps/explorer/test/explorer/chain/import/runner/blocks_test.exs +++ b/apps/explorer/test/explorer/chain/import/runner/blocks_test.exs @@ -115,44 +115,6 @@ defmodule Explorer.Chain.Import.Runner.BlocksTest do assert count(Address.CurrentTokenBalance) == count end - test "remove_nonconsensus_token_transfers deletes token transfer rows with matching block number when new consensus block is inserted", - %{consensus_block: %{number: block_number} = block, options: options} do - consensus_block = insert(:block, number: block_number, consensus: true) - - transaction = insert(:transaction) |> with_block(consensus_block) - - %TokenTransfer{transaction_hash: transaction_hash, log_index: log_index} = - insert(:token_transfer, block_number: block_number, transaction: transaction) - - assert count(TokenTransfer) == 1 - - assert {:ok, - %{ - remove_nonconsensus_token_transfers: [ - %{transaction_hash: ^transaction_hash, log_index: ^log_index} - ] - }} = run_block_consensus_change(block, true, options) - - assert count(TokenTransfer) == 0 - end - - test "remove_nonconsensus_token_transfers does not delete token transfer rows with matching block number when new consensus block wasn't inserted", - %{consensus_block: %{number: block_number} = block, options: options} do - consensus_block = insert(:block, number: block_number, consensus: true) - - transaction = insert(:transaction) |> with_block(consensus_block) - - insert(:token_transfer, block_number: block_number, transaction: transaction) - - count = 1 - - assert count(TokenTransfer) == count - - assert {:ok, %{remove_nonconsensus_token_transfers: []}} = run_block_consensus_change(block, false, options) - - assert count(TokenTransfer) == count - end - test "remove_nonconsensus_logs deletes nonconsensus logs", %{ consensus_block: %{number: block_number} = block, options: options diff --git a/apps/explorer/test/explorer/chain/import_test.exs b/apps/explorer/test/explorer/chain/import_test.exs index 0c559bdfec..4a2fe41c65 100644 --- a/apps/explorer/test/explorer/chain/import_test.exs +++ b/apps/explorer/test/explorer/chain/import_test.exs @@ -149,6 +149,7 @@ defmodule Explorer.Chain.ImportTest do %{ amount: Decimal.new(1_000_000_000_000_000_000), block_number: 37, + block_hash: "0xf6b4b8c88df3ebd252ec476328334dc026cf66606a84fb769b3d3cbccc8471bd", log_index: 0, from_address_hash: "0xe8ddc5c7a2d2f0d7a9798459c0104fdf5e987aca", to_address_hash: "0x515c09c5bba1ed566b02a5b0599ec5d5d0aee73d", @@ -1571,6 +1572,7 @@ defmodule Explorer.Chain.ImportTest do params: [ params_for( :token_transfer, + block_hash: block_hash, block_number: 35, from_address_hash: from_address_hash, to_address_hash: to_address_hash,