Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions crates/stages/src/stages/index_account_history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ mod tests {
}

async fn run(tx: &TestTransaction, run_to: u64) {
let mut input = ExecInput::default();
input.previous_stage = Some((PREV_STAGE_ID, run_to));
let input =
ExecInput { previous_stage: Some((PREV_STAGE_ID, run_to)), ..Default::default() };
let mut stage = IndexAccountHistoryStage::default();
let mut tx = tx.inner();
let out = stage.execute(&mut tx, input).await.unwrap();
Expand All @@ -268,9 +268,7 @@ mod tests {
}

async fn unwind(tx: &TestTransaction, unwind_from: u64, unwind_to: u64) {
let mut input = UnwindInput::default();
input.stage_progress = unwind_from;
input.unwind_to = unwind_to;
let input = UnwindInput { stage_progress: unwind_from, unwind_to, ..Default::default() };
let mut stage = IndexAccountHistoryStage::default();
let mut tx = tx.inner();
let out = stage.unwind(&mut tx, input).await.unwrap();
Expand Down
11 changes: 4 additions & 7 deletions crates/stages/src/stages/index_storage_history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ mod tests {
}

async fn run(tx: &TestTransaction, run_to: u64) {
let mut input = ExecInput::default();
input.previous_stage = Some((PREV_STAGE_ID, run_to));
let input =
ExecInput { previous_stage: Some((PREV_STAGE_ID, run_to)), ..Default::default() };
let mut stage = IndexStorageHistoryStage::default();
let mut tx = tx.inner();
let out = stage.execute(&mut tx, input).await.unwrap();
Expand All @@ -292,9 +292,7 @@ mod tests {
}

async fn unwind(tx: &TestTransaction, unwind_from: u64, unwind_to: u64) {
let mut input = UnwindInput::default();
input.stage_progress = unwind_from;
input.unwind_to = unwind_to;
let input = UnwindInput { stage_progress: unwind_from, unwind_to, ..Default::default() };
let mut stage = IndexStorageHistoryStage::default();
let mut tx = tx.inner();
let out = stage.unwind(&mut tx, input).await.unwrap();
Expand Down Expand Up @@ -357,8 +355,7 @@ mod tests {
async fn insert_index_to_full_shard() {
// init
let tx = TestTransaction::default();
let mut input = ExecInput::default();
input.previous_stage = Some((PREV_STAGE_ID, 5));
let _input = ExecInput { previous_stage: Some((PREV_STAGE_ID, 5)), ..Default::default() };

// change does not matter only that account is present in changeset.
let full_list = vec![3; NUM_OF_INDICES_IN_SHARD];
Expand Down
6 changes: 3 additions & 3 deletions crates/storage/db/benches/criterion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ where
crsr.append(k, v).expect("submit");
}

tx.inner.commit().unwrap();
tx.inner.commit().unwrap()
});
},
)
Expand All @@ -171,7 +171,7 @@ where
crsr.insert(k, v).expect("submit");
}

tx.inner.commit().unwrap();
tx.inner.commit().unwrap()
});
},
)
Expand Down Expand Up @@ -241,7 +241,7 @@ where
crsr.append_dup(k, v).expect("submit");
}

tx.inner.commit().unwrap();
tx.inner.commit().unwrap()
});
},
)
Expand Down
8 changes: 4 additions & 4 deletions crates/storage/db/benches/hash_keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub fn hash_keys(c: &mut Criterion) {

group.sample_size(10);

for size in vec![10_000, 100_000, 1_000_000] {
for size in [10_000, 100_000, 1_000_000] {
measure_table_insertion::<TxHashNumber>(&mut group, size);
}
}
Expand Down Expand Up @@ -176,7 +176,7 @@ where
crsr.append(k, v).expect("submit");
}

tx.inner.commit().unwrap();
tx.inner.commit().unwrap()
});
}
db
Expand All @@ -197,7 +197,7 @@ where
crsr.insert(k, v).expect("submit");
}

tx.inner.commit().unwrap();
tx.inner.commit().unwrap()
});
}
db
Expand All @@ -214,7 +214,7 @@ where
tx.put::<T>(k, v).expect("submit");
}

tx.inner.commit().unwrap();
tx.inner.commit().unwrap()
});
}
db
Expand Down