starknet_patricia_storage: remove code dup for mget#12175
starknet_patricia_storage: remove code dup for mget#12175nimrod-starkware wants to merge 1 commit intonimrod/parallel-reads/spawn-based-on-configfrom
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
1ab4b2e to
96e6b8b
Compare
1729e41 to
b32ebca
Compare
9ead71a to
51f7b26
Compare
58b2329 to
198f552
Compare
198f552 to
48301ce
Compare
51f7b26 to
1f5af39
Compare
48301ce to
6398d19
Compare
1ab4ce9 to
e03a849
Compare
6da69c6 to
94c3443
Compare
e03a849 to
8222312
Compare
94c3443 to
246f8b2
Compare
f3aca6a to
3e72115
Compare
1e4407b to
e990000
Compare
3e72115 to
36a133f
Compare
e990000 to
e7cd356
Compare
36a133f to
ab3f029
Compare
ab3f029 to
dc6c416
Compare
e7cd356 to
4a46808
Compare
4a46808 to
695d081
Compare
dc6c416 to
4ef3e58
Compare
ArielElp
left a comment
There was a problem hiding this comment.
@ArielElp made 2 comments.
Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on nimrod-starkware).
crates/starknet_patricia_storage/src/rocksdb_storage.rs line 266 at r1 (raw file):
} fn mget_from_raw_keys<K: AsRef<[u8]>, RK: IntoIterator<Item = K>>(
consider the proposal from the previous PR:
fn multi_get(
db: &DB,
keys: impl IntoIterator<Item = impl AsRef<[u8]>>,
) -> Result<Vec<Option<DbValue>>, PatriciaStorageError> {
db.multi_get(keys)
.into_iter()
.map(|r| r.map(|opt| opt.map(DbValue)).map_err(|e| e.into()))
.collect()
}
no new generics here
crates/starknet_patricia_storage/src/rocksdb_storage.rs line 272 at r1 (raw file):
db.multi_get(raw_keys) .into_iter() .map(|r| r.map(|opt| opt.map(DbValue)).map_err(|e| e.into()))
I think things compile without it
Code quote:
map_err(|e| e.into()
ArielElp
left a comment
There was a problem hiding this comment.
@ArielElp reviewed 1 file and all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on nimrod-starkware).

Note
Low Risk
Pure refactor confined to RocksDB batch-read code; behavior should be unchanged aside from potential edge-case differences in iterator/key types passed to
multi_get.Overview
Refactors
RocksDbStorage::mgetto remove duplicatedmulti_get/error-mapping logic by introducing a shared helpermget_from_raw_keys.Both the
spawn_blockingand direct-read branches now call this helper, keeping behavior the same while centralizing the result conversion and error handling.Written by Cursor Bugbot for commit 4ef3e58. This will update automatically on new commits. Configure here.