mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 03:21:06 +00:00
Mass replace ,); pattern (#3580)
This is an artifact left by rustfmt which is not dare to remove the comma being conservative.
This commit is contained in:
@@ -524,7 +524,7 @@ fn force_approve_works() {
|
||||
.unwrap()
|
||||
.approved_bitfield
|
||||
.not_any());
|
||||
assert_eq!(approved_hashes, vec![block_hash_b, block_hash_a],);
|
||||
assert_eq!(approved_hashes, vec![block_hash_b, block_hash_a]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -502,7 +502,7 @@ pub(crate) async fn handle_new_head(
|
||||
};
|
||||
|
||||
if let Some(up_to) = force_approve {
|
||||
tracing::debug!(target: LOG_TARGET, ?block_hash, up_to, "Enacting force-approve",);
|
||||
tracing::debug!(target: LOG_TARGET, ?block_hash, up_to, "Enacting force-approve");
|
||||
|
||||
let approved_hashes = crate::ops::force_approve(db, block_hash, up_to)
|
||||
.map_err(|e| SubsystemError::with_origin("approval-voting", e))?;
|
||||
|
||||
@@ -960,7 +960,7 @@ fn distribution_messages_for_activation(
|
||||
let block_entry = match db.load_block_entry(&block_hash)? {
|
||||
Some(b) => b,
|
||||
None => {
|
||||
tracing::warn!(target: LOG_TARGET, ?block_hash, "Missing block entry",);
|
||||
tracing::warn!(target: LOG_TARGET, ?block_hash, "Missing block entry");
|
||||
|
||||
continue
|
||||
},
|
||||
@@ -2222,7 +2222,7 @@ async fn launch_approval(
|
||||
// Validation checked out. Issue an approval command. If the underlying service is unreachable,
|
||||
// then there isn't anything we can do.
|
||||
|
||||
tracing::trace!(target: LOG_TARGET, ?candidate_hash, ?para_id, "Candidate Valid",);
|
||||
tracing::trace!(target: LOG_TARGET, ?candidate_hash, ?para_id, "Candidate Valid");
|
||||
|
||||
let expected_commitments_hash = candidate.commitments_hash;
|
||||
if commitments.hash() == expected_commitments_hash {
|
||||
|
||||
@@ -707,7 +707,7 @@ fn note_block_backed(
|
||||
) -> Result<(), Error> {
|
||||
let candidate_hash = candidate.hash();
|
||||
|
||||
tracing::debug!(target: LOG_TARGET, ?candidate_hash, "Candidate backed",);
|
||||
tracing::debug!(target: LOG_TARGET, ?candidate_hash, "Candidate backed");
|
||||
|
||||
if load_meta(db, config, &candidate_hash)?.is_none() {
|
||||
let meta = CandidateMeta {
|
||||
@@ -748,7 +748,7 @@ fn note_block_included(
|
||||
Some(mut meta) => {
|
||||
let be_block = (BEBlockNumber(block.0), block.1);
|
||||
|
||||
tracing::debug!(target: LOG_TARGET, ?candidate_hash, "Candidate included",);
|
||||
tracing::debug!(target: LOG_TARGET, ?candidate_hash, "Candidate included");
|
||||
|
||||
meta.state = match meta.state {
|
||||
State::Unavailable(at) => {
|
||||
@@ -1194,7 +1194,7 @@ fn store_available_data(
|
||||
|
||||
subsystem.db.write(tx)?;
|
||||
|
||||
tracing::debug!(target: LOG_TARGET, ?candidate_hash, "Stored data and chunks",);
|
||||
tracing::debug!(target: LOG_TARGET, ?candidate_hash, "Stored data and chunks");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -720,7 +720,7 @@ fn stored_data_kept_until_finalized() {
|
||||
test_state.wait_for_pruning().await;
|
||||
|
||||
// At this point data should be gone from the store.
|
||||
assert!(query_available_data(&mut virtual_overseer, candidate_hash).await.is_none(),);
|
||||
assert!(query_available_data(&mut virtual_overseer, candidate_hash).await.is_none());
|
||||
|
||||
assert!(has_all_chunks(&mut virtual_overseer, candidate_hash, n_validators, false).await);
|
||||
virtual_overseer
|
||||
@@ -964,9 +964,9 @@ fn forkfullness_works() {
|
||||
available_data_2,
|
||||
);
|
||||
|
||||
assert!(has_all_chunks(&mut virtual_overseer, candidate_1_hash, n_validators, true).await,);
|
||||
assert!(has_all_chunks(&mut virtual_overseer, candidate_1_hash, n_validators, true).await);
|
||||
|
||||
assert!(has_all_chunks(&mut virtual_overseer, candidate_2_hash, n_validators, true).await,);
|
||||
assert!(has_all_chunks(&mut virtual_overseer, candidate_2_hash, n_validators, true).await);
|
||||
|
||||
// Candidate 2 should now be considered unavailable and will be pruned.
|
||||
test_state.clock.inc(test_state.pruning_config.keep_unavailable_for);
|
||||
@@ -977,24 +977,24 @@ fn forkfullness_works() {
|
||||
available_data_1,
|
||||
);
|
||||
|
||||
assert!(query_available_data(&mut virtual_overseer, candidate_2_hash).await.is_none(),);
|
||||
assert!(query_available_data(&mut virtual_overseer, candidate_2_hash).await.is_none());
|
||||
|
||||
assert!(has_all_chunks(&mut virtual_overseer, candidate_1_hash, n_validators, true).await,);
|
||||
assert!(has_all_chunks(&mut virtual_overseer, candidate_1_hash, n_validators, true).await);
|
||||
|
||||
assert!(has_all_chunks(&mut virtual_overseer, candidate_2_hash, n_validators, false).await,);
|
||||
assert!(has_all_chunks(&mut virtual_overseer, candidate_2_hash, n_validators, false).await);
|
||||
|
||||
// Wait for longer than finalized blocks should be kept for
|
||||
test_state.clock.inc(test_state.pruning_config.keep_finalized_for);
|
||||
test_state.wait_for_pruning().await;
|
||||
|
||||
// Everything should be pruned now.
|
||||
assert!(query_available_data(&mut virtual_overseer, candidate_1_hash).await.is_none(),);
|
||||
assert!(query_available_data(&mut virtual_overseer, candidate_1_hash).await.is_none());
|
||||
|
||||
assert!(query_available_data(&mut virtual_overseer, candidate_2_hash).await.is_none(),);
|
||||
assert!(query_available_data(&mut virtual_overseer, candidate_2_hash).await.is_none());
|
||||
|
||||
assert!(has_all_chunks(&mut virtual_overseer, candidate_1_hash, n_validators, false).await,);
|
||||
assert!(has_all_chunks(&mut virtual_overseer, candidate_1_hash, n_validators, false).await);
|
||||
|
||||
assert!(has_all_chunks(&mut virtual_overseer, candidate_2_hash, n_validators, false).await,);
|
||||
assert!(has_all_chunks(&mut virtual_overseer, candidate_2_hash, n_validators, false).await);
|
||||
virtual_overseer
|
||||
});
|
||||
}
|
||||
|
||||
@@ -481,7 +481,7 @@ mod tests {
|
||||
.write(vec![BackendWriteOp::DeleteBlockEntry(block_entry.block_hash)])
|
||||
.unwrap();
|
||||
|
||||
assert!(backend.load_block_entry(&block_entry.block_hash).unwrap().is_none(),);
|
||||
assert!(backend.load_block_entry(&block_entry.block_hash).unwrap().is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -491,7 +491,7 @@ mod tests {
|
||||
|
||||
let mut backend = DbBackend::new(db, config);
|
||||
|
||||
assert!(backend.load_first_block_number().unwrap().is_none(),);
|
||||
assert!(backend.load_first_block_number().unwrap().is_none());
|
||||
|
||||
backend
|
||||
.write(vec![
|
||||
@@ -501,7 +501,7 @@ mod tests {
|
||||
])
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(backend.load_first_block_number().unwrap(), Some(2),);
|
||||
assert_eq!(backend.load_first_block_number().unwrap(), Some(2));
|
||||
|
||||
backend
|
||||
.write(vec![
|
||||
@@ -510,7 +510,7 @@ mod tests {
|
||||
])
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(backend.load_first_block_number().unwrap(), Some(10),);
|
||||
assert_eq!(backend.load_first_block_number().unwrap(), Some(10));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -521,7 +521,7 @@ mod tests {
|
||||
let mut backend = DbBackend::new(db, config);
|
||||
|
||||
// Prove that it's cheap
|
||||
assert!(backend.load_stagnant_at_up_to(Timestamp::max_value()).unwrap().is_empty(),);
|
||||
assert!(backend.load_stagnant_at_up_to(Timestamp::max_value()).unwrap().is_empty());
|
||||
|
||||
backend
|
||||
.write(vec![
|
||||
@@ -584,9 +584,9 @@ mod tests {
|
||||
])
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(backend.load_blocks_by_number(2).unwrap(), vec![Hash::repeat_byte(1)],);
|
||||
assert_eq!(backend.load_blocks_by_number(2).unwrap(), vec![Hash::repeat_byte(1)]);
|
||||
|
||||
assert_eq!(backend.load_blocks_by_number(3).unwrap(), vec![],);
|
||||
assert_eq!(backend.load_blocks_by_number(3).unwrap(), vec![]);
|
||||
|
||||
backend
|
||||
.write(vec![
|
||||
@@ -595,10 +595,10 @@ mod tests {
|
||||
])
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(backend.load_blocks_by_number(2).unwrap(), vec![],);
|
||||
assert_eq!(backend.load_blocks_by_number(2).unwrap(), vec![]);
|
||||
|
||||
assert_eq!(backend.load_blocks_by_number(5).unwrap(), vec![],);
|
||||
assert_eq!(backend.load_blocks_by_number(5).unwrap(), vec![]);
|
||||
|
||||
assert_eq!(backend.load_blocks_by_number(10).unwrap(), vec![Hash::repeat_byte(3)],);
|
||||
assert_eq!(backend.load_blocks_by_number(10).unwrap(), vec![Hash::repeat_byte(3)]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -497,7 +497,7 @@ async fn handle_active_leaf(
|
||||
|
||||
let header = match fetch_header(ctx, hash).await? {
|
||||
None => {
|
||||
tracing::warn!(target: LOG_TARGET, ?hash, "Missing header for new head",);
|
||||
tracing::warn!(target: LOG_TARGET, ?hash, "Missing header for new head");
|
||||
return Ok(Vec::new())
|
||||
},
|
||||
Some(h) => h,
|
||||
|
||||
@@ -551,7 +551,7 @@ fn assert_backend_contains<'a>(
|
||||
header.number,
|
||||
hash,
|
||||
);
|
||||
assert!(backend.load_block_entry(&hash).unwrap().is_some(), "no entry found for {}", hash,);
|
||||
assert!(backend.load_block_entry(&hash).unwrap().is_some(), "no entry found for {}", hash);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1138,9 +1138,9 @@ fn finalize_viable_prunes_subtrees() {
|
||||
assert_leaves(&backend, vec![a3_hash, x3_hash]);
|
||||
assert_leaves_query(&mut virtual_overseer, vec![a3_hash, x3_hash]).await;
|
||||
|
||||
assert_eq!(backend.load_first_block_number().unwrap().unwrap(), 3,);
|
||||
assert_eq!(backend.load_first_block_number().unwrap().unwrap(), 3);
|
||||
|
||||
assert_eq!(backend.load_blocks_by_number(3).unwrap(), vec![a3_hash, x3_hash],);
|
||||
assert_eq!(backend.load_blocks_by_number(3).unwrap(), vec![a3_hash, x3_hash]);
|
||||
|
||||
virtual_overseer
|
||||
});
|
||||
|
||||
@@ -304,7 +304,7 @@ mod tests {
|
||||
);
|
||||
|
||||
// Test that overlay returns the correct values before committing.
|
||||
assert_eq!(overlay_db.load_earliest_session().unwrap().unwrap(), 1,);
|
||||
assert_eq!(overlay_db.load_earliest_session().unwrap().unwrap(), 1);
|
||||
|
||||
assert_eq!(
|
||||
overlay_db.load_recent_disputes().unwrap().unwrap(),
|
||||
@@ -328,7 +328,7 @@ mod tests {
|
||||
backend.write(write_ops).unwrap();
|
||||
|
||||
// Test that subsequent writes were written.
|
||||
assert_eq!(backend.load_earliest_session().unwrap().unwrap(), 1,);
|
||||
assert_eq!(backend.load_earliest_session().unwrap().unwrap(), 1);
|
||||
|
||||
assert_eq!(
|
||||
backend.load_recent_disputes().unwrap().unwrap(),
|
||||
@@ -457,7 +457,7 @@ mod tests {
|
||||
let mut overlay_db = OverlayedBackend::new(&backend);
|
||||
note_current_session(&mut overlay_db, current_session).unwrap();
|
||||
|
||||
assert_eq!(overlay_db.load_earliest_session().unwrap(), Some(new_earliest_session),);
|
||||
assert_eq!(overlay_db.load_earliest_session().unwrap(), Some(new_earliest_session));
|
||||
|
||||
assert_eq!(
|
||||
overlay_db.load_recent_disputes().unwrap().unwrap(),
|
||||
|
||||
@@ -498,7 +498,7 @@ async fn handle_new_activations(
|
||||
Ok(SessionWindowUpdate::Advanced { new_window_end: window_end, .. }) => {
|
||||
let session = window_end;
|
||||
if state.highest_session.map_or(true, |s| s < session) {
|
||||
tracing::trace!(target: LOG_TARGET, session, "Observed new session. Pruning",);
|
||||
tracing::trace!(target: LOG_TARGET, session, "Observed new session. Pruning");
|
||||
|
||||
state.highest_session = Some(session);
|
||||
|
||||
|
||||
@@ -258,7 +258,7 @@ async fn spawn_worker_task(program_path: PathBuf, spawn_timeout: Duration) -> Qu
|
||||
match super::worker::spawn(&program_path, spawn_timeout).await {
|
||||
Ok((idle, handle)) => break QueueEvent::Spawn((idle, handle)),
|
||||
Err(err) => {
|
||||
tracing::warn!(target: LOG_TARGET, "failed to spawn an execute worker: {:?}", err,);
|
||||
tracing::warn!(target: LOG_TARGET, "failed to spawn an execute worker: {:?}", err);
|
||||
|
||||
// Assume that the failure intermittent and retry after a delay.
|
||||
Delay::new(Duration::from_secs(3)).await;
|
||||
|
||||
@@ -241,7 +241,7 @@ async fn spawn_worker_task(program_path: PathBuf, spawn_timeout: Duration) -> Po
|
||||
match worker::spawn(&program_path, spawn_timeout).await {
|
||||
Ok((idle, handle)) => break PoolEvent::Spawn(idle, handle),
|
||||
Err(err) => {
|
||||
tracing::warn!(target: LOG_TARGET, "failed to spawn a prepare worker: {:?}", err,);
|
||||
tracing::warn!(target: LOG_TARGET, "failed to spawn a prepare worker: {:?}", err);
|
||||
|
||||
// Assume that the failure intermittent and retry after a delay.
|
||||
Delay::new(Duration::from_secs(3)).await;
|
||||
|
||||
@@ -262,7 +262,7 @@ fn renice(pid: u32, niceness: i32) {
|
||||
unsafe {
|
||||
if -1 == libc::setpriority(libc::PRIO_PROCESS, pid, niceness) {
|
||||
let err = std::io::Error::last_os_error();
|
||||
tracing::warn!(target: LOG_TARGET, "failed to set the priority: {:?}", err,);
|
||||
tracing::warn!(target: LOG_TARGET, "failed to set the priority: {:?}", err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -368,7 +368,7 @@ fn requests_check_validation_outputs() {
|
||||
),
|
||||
})
|
||||
.await;
|
||||
assert_eq!(rx.await.unwrap().unwrap(), runtime_api.validation_outputs_results[¶_a],);
|
||||
assert_eq!(rx.await.unwrap().unwrap(), runtime_api.validation_outputs_results[¶_a]);
|
||||
|
||||
let (tx, rx) = oneshot::channel();
|
||||
ctx_handle
|
||||
@@ -379,7 +379,7 @@ fn requests_check_validation_outputs() {
|
||||
),
|
||||
})
|
||||
.await;
|
||||
assert_eq!(rx.await.unwrap().unwrap(), runtime_api.validation_outputs_results[¶_b],);
|
||||
assert_eq!(rx.await.unwrap().unwrap(), runtime_api.validation_outputs_results[¶_b]);
|
||||
|
||||
ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await;
|
||||
};
|
||||
@@ -664,7 +664,7 @@ fn requests_inbound_hrmp_channels_contents() {
|
||||
),
|
||||
})
|
||||
.await;
|
||||
assert_eq!(rx.await.unwrap().unwrap(), para_b_inbound_channels,);
|
||||
assert_eq!(rx.await.unwrap().unwrap(), para_b_inbound_channels);
|
||||
|
||||
ctx_handle.send(FromOverseer::Signal(OverseerSignal::Conclude)).await;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user