fix: parsing

This commit is contained in:
Ludo Galabru
2023-07-22 00:57:38 -04:00
parent 57a46ec00a
commit 1f047a9162

View File

@@ -7,7 +7,7 @@ use std::{
use chainhook_sdk::{
indexer::bitcoin::{
build_http_client, download_block_with_retry, retrieve_block_hash_with_retry, try_fetch_block_bytes_with_retry, parse_downloaded_block,
build_http_client, download_block_with_retry, retrieve_block_hash_with_retry, try_fetch_block_bytes_with_retry, parse_fetched_block,
},
types::{
BitcoinBlockData, BlockIdentifier, OrdinalInscriptionRevealData,
@@ -1905,7 +1905,7 @@ pub async fn rebuild_rocks_db(
while let Ok(Some(block_bytes)) = block_data_rx.recv() {
let block_compressed_tx_moved = block_compressed_tx.clone();
compress_block_data_pool.execute(move || {
let block_data = parse_downloaded_block(block_bytes).unwrap();
let block_data = parse_fetched_block(block_bytes).unwrap();
let compressed_block =
LazyBlock::from_full_block(&block_data).expect("unable to serialize block");
let block_index = block_data.height as u32;