fix: threading model

This commit is contained in:
Ludo Galabru
2023-07-21 17:50:01 -04:00
parent ad3654d308
commit c9c43ae3e3
3 changed files with 3 additions and 10 deletions

4
Cargo.lock generated
View File

@@ -451,9 +451,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chainhook-sdk"
version = "0.7.6"
version = "0.7.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4fcf1ac477e339eb470e0260746bd828930ad52cb44df85b0a3749827a41353"
checksum = "462ce230bfc1cd6570fa3717d6ef44a0f79729db542dc4f86efd7ad386aa159c"
dependencies = [
"base58 0.2.0",
"base64",

View File

@@ -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.6", default-features = false, features = ["zeromq"] }
chainhook-sdk = { version = "=0.7.7", default-features = false, features = ["zeromq"] }
hiro-system-kit = "0.1.0"
clap = { version = "3.2.23", features = ["derive"], optional = true }
clap_generate = { version = "3.0.3", optional = true }

View File

@@ -972,10 +972,6 @@ pub async fn fetch_and_cache_blocks_in_hord_db(
};
let _ = block_data_tx.send(res);
});
// TODO: remove this join?
if block_height >= ordinal_computing_height {
let _ = retrieve_block_data_pool.join();
}
}
let res = retrieve_block_data_pool.join();
res
@@ -997,9 +993,6 @@ pub async fn fetch_and_cache_blocks_in_hord_db(
block_data,
)));
});
if block_height >= ordinal_computing_height {
let _ = compress_block_data_pool.join();
}
}
let res = compress_block_data_pool.join();
res