Skip to content

Commit

Permalink
fix: use rpc instead of rest
Browse files Browse the repository at this point in the history
  • Loading branch information
lgalabru committed Jul 22, 2023
1 parent d59eb9c commit 1b18818
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/hord-cli/Cargo.toml
Expand Up @@ -14,7 +14,7 @@ redis = "0.21.5"
serde-redis = "0.12.0"
hex = "0.4.3"
rand = "0.8.5"
chainhook-sdk = { version = "=0.7.8", default-features = false, features = ["zeromq"] }
chainhook-sdk = { version = "=0.7.9", default-features = false, features = ["zeromq"] }
# chainhook-sdk = { version = "=0.7.7", path = "../../../chainhook/components/chainhook-sdk", default-features = false, features = ["zeromq"] }
hiro-system-kit = "0.1.0"
clap = { version = "3.2.23", features = ["derive"], optional = true }
Expand Down
8 changes: 4 additions & 4 deletions components/hord-cli/src/db/mod.rs
Expand Up @@ -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_fetched_block,
build_http_client, download_block_with_retry, retrieve_block_hash_with_retry, try_download_block_bytes_with_retry, parse_fetched_block, download_block, parse_downloaded_block,
},
types::{
BitcoinBlockData, BlockIdentifier, OrdinalInscriptionRevealData,
Expand Down Expand Up @@ -1891,7 +1891,7 @@ pub async fn rebuild_rocks_db(
let config = moved_config.clone();
let ctx = moved_ctx.clone();
let http_client = moved_http_client.clone();
set.spawn(try_fetch_block_bytes_with_retry(
set.spawn(try_download_block_bytes_with_retry(
http_client,
block_height,
config,
Expand All @@ -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_fetched_block(block_bytes).unwrap();
let block_data = parse_downloaded_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;
Expand Down Expand Up @@ -1998,7 +1998,7 @@ pub async fn rebuild_rocks_db(
let config = moved_config.clone();
let ctx = ctx.clone();
let http_client = moved_http_client.clone();
set.spawn(try_fetch_block_bytes_with_retry(
set.spawn(try_download_block_bytes_with_retry(
http_client,
block_height,
config,
Expand Down

0 comments on commit 1b18818

Please sign in to comment.