Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SWvheerden committed Jan 9, 2025
1 parent 0a716fa commit 2e64414
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion base_layer/core/src/chain_storage/lmdb_db/lmdb_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,11 @@ impl LMDBDatabase {
prune_interval: u64,
) -> Result<Self, ChainStorageError> {
let env = store.env();
let smt_cache_period = prune_interval.checked_div(2).unwrap_or(SMT_CACHE_PERIOD);
let smt_cache_period = if prune_interval == 0 {
SMT_CACHE_PERIOD
} else {
prune_interval / 2
};

let db = Self {
metadata_db: get_database(store, LMDB_DB_METADATA)?,
Expand Down

0 comments on commit 2e64414

Please sign in to comment.