Skip to content

Commit 46cae23

Browse files
committed
speedup checking value in db
1 parent d0b38e4 commit 46cae23

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ tycho-util = { path = "./util", version = "0.2.8" }
136136

137137
[patch.crates-io]
138138
everscale-types = { git = "https://github.com/broxus/everscale-types.git", rev = "048b934f6fcc4e5d3c1199af08ab6d20aa4f9471" }
139+
weedb = { git = "https://github.com/broxus/weedb.git", rev = "af2bbc262b6ea9282cd9d29ec5062db040ea40e5" }
139140

140141
[workspace.lints.rust]
141142
future_incompatible = "warn"

storage/src/store/shard_state/cell_storage.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,10 @@ impl StoreContext {
482482
}
483483
}
484484

485+
if !self.db.cells.key_may_exist(key) {
486+
break 'value (0, false);
487+
}
488+
485489
match self.db.cells.get(key).map_err(CellStorageError::Internal)? {
486490
Some(value) => {
487491
let (rc, value) = refcount::decode_value_with_rc(value.as_ref());

0 commit comments

Comments
 (0)