Skip to content

Commit

Permalink
fix query
Browse files Browse the repository at this point in the history
  • Loading branch information
tamirms committed Jul 26, 2024
1 parent e86edf4 commit 93f7ae9
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions services/horizon/internal/db2/history/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,28 +72,7 @@ func TestElderLedger(t *testing.T) {
func TestConstructReapLookupTablesQuery(t *testing.T) {
query := constructReapLookupTablesQuery(
"history_accounts",
[]tableObjectFieldPair{
{
name: "history_transaction_participants",
objectField: "history_account_id",
},
{
name: "history_effects",
objectField: "history_account_id",
},
{
name: "history_operation_participants",
objectField: "history_account_id",
},
{
name: "history_trades",
objectField: "base_account_id",
},
{
name: "history_trades",
objectField: "counter_account_id",
},
},
historyLookupTables["history_accounts"],
10,
0,
)
Expand All @@ -105,5 +84,5 @@ func TestConstructReapLookupTablesQuery(t *testing.T) {
"AND NOT EXISTS ( SELECT 1 as row FROM history_effects WHERE history_effects.history_account_id = id LIMIT 1) "+
"AND NOT EXISTS ( SELECT 1 as row FROM history_operation_participants WHERE history_operation_participants.history_account_id = id LIMIT 1) "+
"AND NOT EXISTS ( SELECT 1 as row FROM history_trades WHERE history_trades.base_account_id = id LIMIT 1) "+
"AND NOT EXISTS ( SELECT 1 as row FROM history_trades WHERE history_trades.counter_account_id = id LIMIT 1)", query)
"AND NOT EXISTS ( SELECT 1 as row FROM history_trades WHERE history_trades.counter_account_id = id LIMIT 1))", query)
}

0 comments on commit 93f7ae9

Please sign in to comment.