Doesn't count every sibling unecessarily.

In where_transaction_has_multiple_internal_transactions it counts every
sibling uncessarily, I added a limit to it so it only selects up to 2.
pull/889/head
Lokraan 6 years ago
parent 0a45b4984a
commit 0530d69e7f
  1. 4
      apps/explorer/lib/explorer/chain.ex

@ -1816,7 +1816,9 @@ defmodule Explorer.Chain do
"""
(SELECT COUNT(sibling.id)
FROM internal_transactions AS sibling
WHERE sibling.transaction_hash = ?)
WHERE sibling.transaction_hash = ?
LIMIT 2
)
""",
transaction.hash
) > 1

Loading…
Cancel
Save