Skip to content

Commit d920b54

Browse files
remove now-unused root_bagging db field
1 parent e27fb5b commit d920b54

6 files changed

Lines changed: 7 additions & 14 deletions

File tree

storage/src/qmdb/any/db.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::{
1313
contiguous::{Contiguous, Mutable, Reader},
1414
Error as JournalError,
1515
},
16-
merkle::{Bagging, Family, Location, Proof},
16+
merkle::{Family, Location, Proof},
1717
qmdb::{
1818
bitmap::Shared, build_snapshot_from_log, delete_known_loc,
1919
operation::Operation as OperationTrait, update_known_loc, Error,
@@ -79,10 +79,6 @@ pub struct Db<
7979
/// Whether the operations root uses inactive-prefix split semantics.
8080
pub(crate) split_root: bool,
8181

82-
/// Bagging used by the operations root.
83-
#[allow(dead_code)]
84-
pub(crate) root_bagging: Bagging,
85-
8682
/// A location before which all operations are "inactive" (that is, operations before this point
8783
/// are over keys that have been updated by some operation at or after this point).
8884
pub(crate) inactivity_floor_loc: Location<F>,
@@ -573,7 +569,6 @@ where
573569
log: AuthenticatedLog<F, E, C, H>,
574570
shared_bitmap: Option<Arc<Shared<N>>>,
575571
split_root: bool,
576-
root_bagging: Bagging,
577572
) -> Result<Self, crate::qmdb::Error<F>> {
578573
let (last_commit_loc, inactivity_floor_loc, active_keys, bitmap) = {
579574
let reader = log.reader().await;
@@ -666,7 +661,6 @@ where
666661
log,
667662
root,
668663
split_root,
669-
root_bagging,
670664
inactivity_floor_loc,
671665
snapshot: index,
672666
last_commit_loc,

storage/src/qmdb/any/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,12 @@ where
157157
Operation<F, U>: Committable + CodecShared,
158158
{
159159
let split_root = cfg.split_root;
160-
let root_bagging = cfg.root_bagging;
161160
let mut log = J::init::<F, H>(
162161
context.with_label("log"),
163162
cfg.merkle_config,
164163
cfg.journal_config,
165164
Operation::is_commit,
166-
root_bagging,
165+
cfg.root_bagging,
167166
)
168167
.await?;
169168

@@ -175,7 +174,7 @@ where
175174
}
176175

177176
let index = I::new(context.with_label("index"), cfg.translator);
178-
db::Db::init_from_log(index, log, bitmap, split_root, root_bagging).await
177+
db::Db::init_from_log(index, log, bitmap, split_root).await
179178
}
180179

181180
#[cfg(test)]

storage/src/qmdb/any/ordered/fixed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ pub(crate) mod test {
162162
async fn open_db_generic<F: Family + Bagging>(
163163
context: deterministic::Context,
164164
) -> AnyTestGeneric<F> {
165-
let cfg = fixed_db_config::<mmr::Family, TwoCap>("partition", &context);
165+
let cfg = fixed_db_config::<F, TwoCap>("partition", &context);
166166
crate::qmdb::any::init(context, cfg).await.unwrap()
167167
}
168168

storage/src/qmdb/any/sync/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ where
128128
apply_batch_size as u64,
129129
)
130130
.await?;
131-
let db = Db::init_from_log(index, log, None, split_root, root_bagging).await?;
131+
let db = Db::init_from_log(index, log, None, split_root).await?;
132132

133133
Ok(db)
134134
}

storage/src/qmdb/any/unordered/fixed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ pub(crate) mod test {
151151
async fn open_db_generic<F: Family + Bagging>(
152152
context: deterministic::Context,
153153
) -> AnyTestGeneric<F> {
154-
let cfg = fixed_db_config::<mmr::Family, TwoCap>("partition", &context);
154+
let cfg = fixed_db_config::<F, TwoCap>("partition", &context);
155155
crate::qmdb::any::init(context, cfg).await.unwrap()
156156
}
157157

storage/src/qmdb/current/sync/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ where
149149
// Build any::Db, handing it the pre-allocated bitmap. `init_from_log` populates the bitmap
150150
// during replay.
151151
let any: AnyDb<F, E, J, I, H, U, N> =
152-
AnyDb::init_from_log(index, log, Some(bitmap), false, Bagging::ForwardFold).await?;
152+
AnyDb::init_from_log(index, log, Some(bitmap), false).await?;
153153

154154
// Fetch grafted pinned nodes from the ops tree. For each position the grafted family
155155
// needs at its pruning boundary, source the digest from the ops tree via the zero-chunk

0 commit comments

Comments
 (0)