mirror of
https://github.com/alexgo-io/bitcoin-indexer.git
synced 2026-06-14 16:39:27 +08:00
fix: cache size
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "chainhook"
|
||||
version = "0.13.0"
|
||||
version = "0.14.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@@ -644,7 +644,7 @@ async fn handle_command(opts: Opts, ctx: Context) -> Result<(), String> {
|
||||
};
|
||||
|
||||
let transaction_identifier = TransactionIdentifier { hash: txid.clone() };
|
||||
let traversals_cache = new_traversals_lazy_cache();
|
||||
let traversals_cache = new_traversals_lazy_cache(1024);
|
||||
let traversal = retrieve_satoshi_point_using_lazy_storage(
|
||||
&hord_db_conn,
|
||||
&block_identifier,
|
||||
@@ -666,7 +666,7 @@ async fn handle_command(opts: Opts, ctx: Context) -> Result<(), String> {
|
||||
let block =
|
||||
fetch_and_standardize_block(cmd.block_height, &bitcoin_config, &ctx)
|
||||
.await?;
|
||||
let traversals_cache = Arc::new(new_traversals_lazy_cache());
|
||||
let traversals_cache = Arc::new(new_traversals_lazy_cache(1024));
|
||||
|
||||
let _traversals = retrieve_inscribed_satoshi_points_from_block(
|
||||
&block,
|
||||
|
||||
@@ -599,7 +599,11 @@ pub async fn start_observer_commands_handler(
|
||||
let mut chainhooks_lookup: HashMap<String, ApiKey> = HashMap::new();
|
||||
let networks = (&config.bitcoin_network, &config.stacks_network);
|
||||
let mut bitcoin_block_store: HashMap<BlockIdentifier, BitcoinBlockData> = HashMap::new();
|
||||
let traversals_cache = Arc::new(new_traversals_lazy_cache());
|
||||
let cache_size = config
|
||||
.hord_config
|
||||
.and_then(|ref c| Some(c.cache_size))
|
||||
.unwrap_or(0);
|
||||
let traversals_cache = Arc::new(new_traversals_lazy_cache(cache_size));
|
||||
|
||||
loop {
|
||||
let command = match observer_commands_rx.recv() {
|
||||
|
||||
Reference in New Issue
Block a user