fix: Fix address_to_logs consensus filtering (#10528)

pull/10532/head
Qwerty5Uiop 4 months ago committed by GitHub
parent a2625803c8
commit 51f9d846fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 29
      apps/explorer/lib/explorer/chain.ex

@ -377,26 +377,15 @@ defmodule Explorer.Chain do
to_block = to_block(options)
base =
if DenormalizationHelper.transactions_denormalization_finished?() do
from(log in Log,
order_by: [desc: log.block_number, desc: log.index],
where: log.address_hash == ^address_hash,
limit: ^paging_options.page_size,
select: log,
inner_join: transaction in assoc(log, :transaction),
where: transaction.block_consensus == true
)
else
from(log in Log,
order_by: [desc: log.block_number, desc: log.index],
where: log.address_hash == ^address_hash,
limit: ^paging_options.page_size,
select: log,
inner_join: block in Block,
on: block.hash == log.block_hash,
where: block.consensus == true
)
end
from(log in Log,
order_by: [desc: log.block_number, desc: log.index],
where: log.address_hash == ^address_hash,
limit: ^paging_options.page_size,
select: log,
inner_join: block in Block,
on: block.hash == log.block_hash,
where: block.consensus == true
)
preloaded_query =
if csv_export? do

Loading…
Cancel
Save