From 0293606d25b12983fe0767c10baec1c648140254 Mon Sep 17 00:00:00 2001 From: ClaytonNorthey92 Date: Tue, 10 Sep 2024 16:46:15 -0400 Subject: [PATCH] bound height to 100 from canonical tip as to not have to scan large portion of index --- database/bfgd/postgres/postgres.go | 1 + 1 file changed, 1 insertion(+) diff --git a/database/bfgd/postgres/postgres.go b/database/bfgd/postgres/postgres.go index f3c3ffcd..8a7916c4 100644 --- a/database/bfgd/postgres/postgres.go +++ b/database/bfgd/postgres/postgres.go @@ -38,6 +38,7 @@ const effectiveHeightSql = ` = pop_basis.l2_keystone_abrev_hash WHERE ll.l2_block_number >= l2_keystones.l2_block_number + AND height > (SELECT height FROM btc_blocks_can ORDER BY height DESC LIMIT 1) - 100 ORDER BY height ASC LIMIT 1 )), 0) `