Remove extra commas made redundent after rustfmt (#9404)

* Remove extra commas made redundent after rustfmt
This commit is contained in:
Squirrel
2021-07-22 11:06:17 +01:00
committed by GitHub
parent e18f388dac
commit aafe64315a
101 changed files with 309 additions and 309 deletions
+14 -14
View File
@@ -1220,13 +1220,13 @@ fn import_with_justification() {
.block;
block_on(client.import_justified(BlockOrigin::Own, a3.clone(), justification.clone())).unwrap();
assert_eq!(client.chain_info().finalized_hash, a3.hash(),);
assert_eq!(client.chain_info().finalized_hash, a3.hash());
assert_eq!(client.justifications(&BlockId::Hash(a3.hash())).unwrap(), Some(justification),);
assert_eq!(client.justifications(&BlockId::Hash(a3.hash())).unwrap(), Some(justification));
assert_eq!(client.justifications(&BlockId::Hash(a1.hash())).unwrap(), None,);
assert_eq!(client.justifications(&BlockId::Hash(a1.hash())).unwrap(), None);
assert_eq!(client.justifications(&BlockId::Hash(a2.hash())).unwrap(), None,);
assert_eq!(client.justifications(&BlockId::Hash(a2.hash())).unwrap(), None);
}
#[test]
@@ -1265,15 +1265,15 @@ fn importing_diverged_finalized_block_should_trigger_reorg() {
let b1 = b1.build().unwrap().block;
// A2 is the current best since it's the longest chain
assert_eq!(client.chain_info().best_hash, a2.hash(),);
assert_eq!(client.chain_info().best_hash, a2.hash());
// importing B1 as finalized should trigger a re-org and set it as new best
let justification = Justifications::from((TEST_ENGINE_ID, vec![1, 2, 3]));
block_on(client.import_justified(BlockOrigin::Own, b1.clone(), justification)).unwrap();
assert_eq!(client.chain_info().best_hash, b1.hash(),);
assert_eq!(client.chain_info().best_hash, b1.hash());
assert_eq!(client.chain_info().finalized_hash, b1.hash(),);
assert_eq!(client.chain_info().finalized_hash, b1.hash());
}
#[test]
@@ -1320,21 +1320,21 @@ fn finalizing_diverged_block_should_trigger_reorg() {
block_on(client.import(BlockOrigin::Own, b2.clone())).unwrap();
// A2 is the current best since it's the longest chain
assert_eq!(client.chain_info().best_hash, a2.hash(),);
assert_eq!(client.chain_info().best_hash, a2.hash());
// we finalize block B1 which is on a different branch from current best
// which should trigger a re-org.
ClientExt::finalize_block(&client, BlockId::Hash(b1.hash()), None).unwrap();
// B1 should now be the latest finalized
assert_eq!(client.chain_info().finalized_hash, b1.hash(),);
assert_eq!(client.chain_info().finalized_hash, b1.hash());
// and B1 should be the new best block (`finalize_block` as no way of
// knowing about B2)
assert_eq!(client.chain_info().best_hash, b1.hash(),);
assert_eq!(client.chain_info().best_hash, b1.hash());
// `SelectChain` should report B2 as best block though
assert_eq!(block_on(select_chain.best_chain()).unwrap().hash(), b2.hash(),);
assert_eq!(block_on(select_chain.best_chain()).unwrap().hash(), b2.hash());
// after we build B3 on top of B2 and import it
// it should be the new best block,
@@ -1346,7 +1346,7 @@ fn finalizing_diverged_block_should_trigger_reorg() {
.block;
block_on(client.import(BlockOrigin::Own, b3.clone())).unwrap();
assert_eq!(client.chain_info().best_hash, b3.hash(),);
assert_eq!(client.chain_info().best_hash, b3.hash());
}
#[test]
@@ -1505,7 +1505,7 @@ fn doesnt_import_blocks_that_revert_finality() {
.to_string(),
);
assert_eq!(import_err.to_string(), expected_err.to_string(),);
assert_eq!(import_err.to_string(), expected_err.to_string());
// adding a C1 block which is lower than the last finalized should also
// fail (with a cheaper check that doesn't require checking ancestry).
@@ -1525,7 +1525,7 @@ fn doesnt_import_blocks_that_revert_finality() {
let expected_err =
ConsensusError::ClientImport(sp_blockchain::Error::NotInFinalizedChain.to_string());
assert_eq!(import_err.to_string(), expected_err.to_string(),);
assert_eq!(import_err.to_string(), expected_err.to_string());
}
#[test]