Merge branch 'master' into ab-transaction-count-cache

pull/1634/head
Ayrat Badykov 6 years ago committed by GitHub
commit 2ac34716b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      CHANGELOG.md
  2. 8
      apps/indexer/lib/indexer/temporary/failed_created_addresses.ex

@ -6,7 +6,8 @@
### Fixes
- [1614](https://github.com/poanetwork/blockscout/pull/1614) - Do not fetch burn address token balance
- [#1621](https://github.com/poanetwork/blockscout/pull/1621) - Modify query to fetch failed contract creations
- [#1614](https://github.com/poanetwork/blockscout/pull/1614) - Do not fetch burn address token balance
### Chore

@ -8,7 +8,7 @@ defmodule Indexer.Temporary.FailedCreatedAddresses do
import Ecto.Query
alias Explorer.Chain.{InternalTransaction, Transaction}
alias Explorer.Chain.{Address, Data, InternalTransaction, Transaction}
alias Explorer.Repo
alias Indexer.Temporary.FailedCreatedAddresses.TaskSupervisor
@ -45,11 +45,15 @@ defmodule Indexer.Temporary.FailedCreatedAddresses do
fetcher: :failed_created_addresses
)
data = %Data{bytes: ""}
query =
from(t in Transaction,
left_join: it in InternalTransaction,
on: it.transaction_hash == t.hash,
where: t.status == ^0 and not is_nil(it.created_contract_address_hash),
left_join: address in Address,
on: address.hash == it.created_contract_address_hash,
where: t.status == ^0 and not is_nil(it.created_contract_address_hash) and address.contract_code != ^data,
distinct: t.hash
)

Loading…
Cancel
Save