-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stopgap to re-fetch blocks with no children (#131)
* stopgap for handling blocks with no children in BFG in BFG, we only increment block height to get each block in the chain; if there is a fork, we don't handle for it. this introduces a check for blocks with no children, it will then "re-process" the block at that height from electrumx * index for better query * Update database/bfgd/postgres/postgres.go Co-authored-by: Joshua Sing <joshua@bloq.com> * Update database/bfgd/postgres/postgres.go Co-authored-by: Joshua Sing <joshua@bloq.com> * Update database/bfgd/postgres/postgres.go Co-authored-by: Joshua Sing <joshua@bloq.com> * removed extra newline * Update database/bfgd/database_ext_test.go Co-authored-by: Joshua Sing <joshua@bloq.com> * handle for collision * fix variable used * correct function * remove collision handling --------- Co-authored-by: Joshua Sing <joshua@bloq.com>
- Loading branch information
1 parent
12eefff
commit 4e1914c
Showing
5 changed files
with
262 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
-- Copyright (c) 2024 Hemi Labs, Inc. | ||
-- Use of this source code is governed by the MIT License, | ||
-- which can be found in the LICENSE file. | ||
|
||
BEGIN; | ||
|
||
UPDATE version SET version = 8; | ||
|
||
CREATE INDEX btc_blocks_header_prev_hash_idx ON btc_blocks (substr(header, 5, 32)); | ||
|
||
COMMIT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters