|
|
|
@ -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 |
|
|
|
|