From 492ddd1ceeb41dc9ce37e5f853685ca365cdf12a Mon Sep 17 00:00:00 2001 From: Doc Ritezel Date: Sat, 10 Feb 2018 10:49:35 -0800 Subject: [PATCH] Do not load blocks in pending transactions query --- .../controllers/pending_transaction_controller.ex | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/explorer_web/controllers/pending_transaction_controller.ex b/lib/explorer_web/controllers/pending_transaction_controller.ex index 074d4fb6f7..2abefe2732 100644 --- a/lib/explorer_web/controllers/pending_transaction_controller.ex +++ b/lib/explorer_web/controllers/pending_transaction_controller.ex @@ -10,13 +10,11 @@ defmodule ExplorerWeb.PendingTransactionController do def index(conn, params) do query = from transaction in Transaction, left_join: block_transaction in assoc(transaction, :block_transaction), - left_join: block in assoc(block_transaction, :block), - left_join: to_address_join in assoc(transaction, :to_address_join), - left_join: to_address in assoc(to_address_join, :address), - left_join: from_address_join in assoc(transaction, :from_address_join), - left_join: from_address in assoc(from_address_join, :address), + join: to_address_join in assoc(transaction, :to_address_join), + join: to_address in assoc(to_address_join, :address), + join: from_address_join in assoc(transaction, :from_address_join), + join: from_address in assoc(from_address_join, :address), preload: [ - block: block, to_address: to_address, from_address: from_address ],