From ad659653534284f19cd9d80257d836fa4d416b4d Mon Sep 17 00:00:00 2001 From: Erwan Date: Tue, 31 Oct 2023 17:54:41 -0400 Subject: [PATCH] penumbra(storage): clean-up of TODO comments --- crates/storage/src/storage.rs | 2 +- crates/storage/src/store/substore.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/storage/src/storage.rs b/crates/storage/src/storage.rs index 78bea23dc9..ad90aee74c 100644 --- a/crates/storage/src/storage.rs +++ b/crates/storage/src/storage.rs @@ -225,7 +225,7 @@ impl Storage { let substore_snapshot = SubstoreSnapshot { config: substore_config.clone(), rocksdb_snapshot: snapshot.0.snapshot.clone(), - version: new_version, // TODO(erwan): we're going to start with globally versioning the substores, but we'll need to change this later. + version: new_version, db: self.0.db.clone(), }; diff --git a/crates/storage/src/store/substore.rs b/crates/storage/src/store/substore.rs index 26b1b3fb12..f5ed309092 100644 --- a/crates/storage/src/store/substore.rs +++ b/crates/storage/src/store/substore.rs @@ -303,6 +303,7 @@ impl SubstoreStorage { .spawn_blocking(move || { span.in_scope(|| { let jmt = jmt::Sha256Jmt::new(&substore_snapshot); + // TODO(erwan): this could be folded with sharding the changesets. let unwritten_changes: Vec<_> = cache .unwritten_changes @@ -333,12 +334,9 @@ impl SubstoreStorage { )?; self.write_node_batch(&batch.node_batch)?; - // substore_snapshot.write_node_batch(&batch.node_batch)?; tracing::trace!(?root_hash, "wrote node batch to backing store"); - // Write the unwritten changes from the nonverifiable to RocksDB. for (k, v) in cache.nonverifiable_changes.into_iter() { - let cf_nonverifiable = substore_snapshot.config.cf_nonverifiable(&db_handle); match v { Some(v) => {