Skip to content

Commit

Permalink
penumbra(storage): clean-up of TODO comments
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanor committed Oct 31, 2023
1 parent 073344a commit ad65965
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/storage/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
};

Expand Down
4 changes: 1 addition & 3 deletions crates/storage/src/store/substore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit ad65965

Please sign in to comment.