Failing regression test for #850

pull/855/head
Luke Imhoff 6 years ago
parent d9988fb5b8
commit f7a902fecb
  1. 2
      apps/explorer/lib/explorer/chain/import.ex
  2. 12
      apps/explorer/test/explorer/chain/import_test.exs

@ -1047,7 +1047,7 @@ defmodule Explorer.Chain.Import do
] ]
) )
{sql, parameters} = SQL.to_sql(:all, Repo, query) {sql, parameters} = SQL.to_sql(:all, Repo, query) |> IO.inspect()
{:ok, %Postgrex.Result{columns: ["uncle_hash", "hash"], command: :insert, rows: rows}} = {:ok, %Postgrex.Result{columns: ["uncle_hash", "hash"], command: :insert, rows: rows}} =
SQL.query( SQL.query(

@ -1629,5 +1629,17 @@ defmodule Explorer.Chain.ImportTest do
assert DateTime.compare(timestamp, timestamp_before) == :eq assert DateTime.compare(timestamp, timestamp_before) == :eq
end end
# https://github.com/poanetwork/blockscout/issues/850 regression test
test "derive_transaction_forks returns errors" do
_pending_transaction = insert(:transaction)
{:error, :derive_transaction_forks, %Postgrex.Error{postgres: %{code: :not_null_violation, column: "index"}}, _} =
Import.all(%{
blocks: %{
params: []
}
})
end
end end
end end

Loading…
Cancel
Save