From b10557b7428d4b6c4f784cee27ea2d9fccf5c902 Mon Sep 17 00:00:00 2001 From: ClaytonNorthey92 Date: Wed, 11 Sep 2024 12:07:24 -0400 Subject: [PATCH] bound height to 100 from canonical tip as to not have to scan large portion of index (#254) --- 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) `