Skip to content

Commit 1b18818

Browse files
author
Ludo Galabru
committed
fix: use rpc instead of rest
1 parent d59eb9c commit 1b18818

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Cargo.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/hord-cli/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ redis = "0.21.5"
1414
serde-redis = "0.12.0"
1515
hex = "0.4.3"
1616
rand = "0.8.5"
17-
chainhook-sdk = { version = "=0.7.8", default-features = false, features = ["zeromq"] }
17+
chainhook-sdk = { version = "=0.7.9", default-features = false, features = ["zeromq"] }
1818
# chainhook-sdk = { version = "=0.7.7", path = "../../../chainhook/components/chainhook-sdk", default-features = false, features = ["zeromq"] }
1919
hiro-system-kit = "0.1.0"
2020
clap = { version = "3.2.23", features = ["derive"], optional = true }

components/hord-cli/src/db/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::{
77

88
use chainhook_sdk::{
99
indexer::bitcoin::{
10-
build_http_client, download_block_with_retry, retrieve_block_hash_with_retry, try_fetch_block_bytes_with_retry, parse_fetched_block,
10+
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,
1111
},
1212
types::{
1313
BitcoinBlockData, BlockIdentifier, OrdinalInscriptionRevealData,
@@ -1891,7 +1891,7 @@ pub async fn rebuild_rocks_db(
18911891
let config = moved_config.clone();
18921892
let ctx = moved_ctx.clone();
18931893
let http_client = moved_http_client.clone();
1894-
set.spawn(try_fetch_block_bytes_with_retry(
1894+
set.spawn(try_download_block_bytes_with_retry(
18951895
http_client,
18961896
block_height,
18971897
config,
@@ -1905,7 +1905,7 @@ pub async fn rebuild_rocks_db(
19051905
while let Ok(Some(block_bytes)) = block_data_rx.recv() {
19061906
let block_compressed_tx_moved = block_compressed_tx.clone();
19071907
compress_block_data_pool.execute(move || {
1908-
let block_data = parse_fetched_block(block_bytes).unwrap();
1908+
let block_data = parse_downloaded_block(block_bytes).unwrap();
19091909
let compressed_block =
19101910
LazyBlock::from_full_block(&block_data).expect("unable to serialize block");
19111911
let block_index = block_data.height as u32;
@@ -1998,7 +1998,7 @@ pub async fn rebuild_rocks_db(
19981998
let config = moved_config.clone();
19991999
let ctx = ctx.clone();
20002000
let http_client = moved_http_client.clone();
2001-
set.spawn(try_fetch_block_bytes_with_retry(
2001+
set.spawn(try_download_block_bytes_with_retry(
20022002
http_client,
20032003
block_height,
20042004
config,

0 commit comments

Comments
 (0)