File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1674,7 +1674,7 @@ impl MpcContract {
16741674 let max_reconstruction_threshold =
16751675 max_reconstruction_threshold ( running_state. domains . domains ( ) ) ;
16761676 if let Err ( err) = ThresholdParameters :: validate_governance_against_reconstruction (
1677- remaining as u64 ,
1677+ u64 :: try_from ( remaining) . expect ( "participant count fits in u64" ) ,
16781678 current_params. threshold ( ) ,
16791679 max_reconstruction_threshold,
16801680 ) {
@@ -1695,7 +1695,8 @@ impl MpcContract {
16951695 //let n_participants_new = new_participants.len();
16961696 //let new_threshold = (3 * n_participants_new + 4) / 5; // minimum 60%
16971697 //let new_threshold = new_threshold.max(2); // but also minimum 2
1698- let new_threshold = current_params. threshold ( ) . value ( ) as usize ;
1698+ let new_threshold = usize:: try_from ( current_params. threshold ( ) . value ( ) )
1699+ . expect ( "threshold value fits in usize" ) ;
16991700
17001701 let threshold_parameters = ThresholdParameters :: new (
17011702 participants_with_valid_attestation,
You can’t perform that action at this time.
0 commit comments