Skip to content

Commit

Permalink
Lower cache size for blocks/SMTs
Browse files Browse the repository at this point in the history
  • Loading branch information
antidmg committed Mar 17, 2023
1 parent 5e2f587 commit 2fd9028
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl NodeRpcImpl {
coin_smts: LruCache::new(100).into(),
summary: LruCache::new(10).into(),
swarm,
abbr_block_cache: moka::sync::Cache::new(100_000),
abbr_block_cache: moka::sync::Cache::new(1000),
indexer,
})
}
Expand Down Expand Up @@ -298,7 +298,6 @@ impl NodeRpcProtocol for NodeRpcImpl {
}
}

// only increment here
height += BlockHeight(1);
}
_ => {
Expand Down
2 changes: 1 addition & 1 deletion src/storage/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl Storage {
Ok(Self {
send_pool,
recv_pool,
old_cache: Arc::new(Cache::new(100_000)),
old_cache: Arc::new(Cache::new(1000)),
forest: Arc::new(forest),

genesis,
Expand Down

1 comment on commit 2fd9028

@antidmg
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.