mirror of
https://github.com/alexgo-io/bitcoin-indexer.git
synced 2026-06-14 16:39:27 +08:00
fix: use rpc instead of rest
This commit is contained in:
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -457,9 +457,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "chainhook-sdk"
|
||||
version = "0.7.8"
|
||||
version = "0.7.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6a7b891891c1449054663529e08c0076504caa47f4d3ad7494ce3fd8468dc2f2"
|
||||
checksum = "2cf67757e92c9dbe2cc488a062b2f619b881322bdba73d4f7561282fee4a6610"
|
||||
dependencies = [
|
||||
"base58 0.2.0",
|
||||
"base64 0.13.1",
|
||||
|
||||
@@ -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 }
|
||||
|
||||
@@ -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,
|
||||
@@ -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,
|
||||
@@ -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;
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user