Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
  • Loading branch information
JesseAbram and HCastano authored Oct 22, 2024
1 parent 3d9bd90 commit 4154e88
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crates/threshold-signature-server/src/validator/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ use synedrion::k256::ecdsa::VerifyingKey;

#[tokio::test]
#[serial]
async fn test_reshare_foo() {
async fn test_reshare() {
initialize_test_logger().await;
clean_tests();

Expand Down
3 changes: 0 additions & 3 deletions pallets/staking/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ use pallet_staking::{
};
use sp_std::{vec, vec::Vec};

// type MaxValidators<T> = <<T as Config>::BenchmarkingConfig as BenchmarkingConfig>::MaxValidators;

const NULL_ARR: [u8; 32] = [0; 32];
const SEED: u32 = 0;

Expand Down Expand Up @@ -438,7 +436,6 @@ benchmarks! {
<T as pallet_session::Config>::ValidatorId::try_from(second_signer.clone())
.or(Err(Error::<T>::InvalidValidatorId))
.unwrap();
// let mut signers = //create_validators::<T>((MAX_SIGNERS - 1) as u32, SEED);
let mut signers = vec![second_signer_id.clone(); c as usize];

// For the purpose of the bench these values don't actually matter, we just care that there's a
Expand Down
2 changes: 1 addition & 1 deletion pallets/staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ pub mod pallet {
let mut remove_index_len = 0;
// removes first signer and pushes new signer to back if total signers not increased
if current_signers_length >= signers_info.total_signers as usize {
let mut remove_indexs = vec![];
let mut remove_indicies = vec![];
for (i, current_signer) in current_signers.clone().into_iter().enumerate() {
if !validators.contains(&current_signer) {
remove_indexs.push(i);
Expand Down
2 changes: 1 addition & 1 deletion pallets/staking/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ fn it_tests_new_session_handler() {
#[test]
fn it_tests_new_session_handler_truncating() {
new_test_ext().execute_with(|| {
// Start with current validators as 5 and 6 based off the Mock `GenesisConfig`.
// Start with current validators as 7 and 8 based off the Mock `GenesisConfig`.
Signers::<Test>::put(vec![7, 8]);
System::set_block_number(100);
pallet_parameters::SignersInfo::<Test>::put(SignersSize {
Expand Down

0 comments on commit 4154e88

Please sign in to comment.