Skip to content

Commit

Permalink
bound height to 100 from canonical tip as to not have to scan large p…
Browse files Browse the repository at this point in the history
…ortion of index (#254)
  • Loading branch information
ClaytonNorthey92 authored Sep 11, 2024
1 parent b662195 commit b10557b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions database/bfgd/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
`
Expand Down

0 comments on commit b10557b

Please sign in to comment.