File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
mainnet_contract/contracts Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,8 @@ contract Subnet {
8181 });
8282 validators[1 ] = Validators ({
8383 set: initial_validator_set,
84- threshold: int256 ((initial_validator_set.length * 2 ) / 3 )
84+ //float mul 100
85+ threshold: int256 ((initial_validator_set.length * 2 * 100 ) / 3 )
8586 });
8687 current_validators = validators[1 ];
8788 setLookup (initial_validator_set);
@@ -188,7 +189,8 @@ contract Subnet {
188189
189190 validators[validationParams.number] = Validators ({
190191 set: next,
191- threshold: int256 ((next.length * 2 ) / 3 )
192+ //float mul 100
193+ threshold: int256 ((next.length * 2 * 100 ) / 3 )
192194 });
193195 } else revert ("Invalid Next Block " );
194196 }
@@ -207,7 +209,7 @@ contract Subnet {
207209 }
208210 (bool is_unique , int unique_counter ) = checkUniqueness (signer_list);
209211 if (! is_unique) revert ("Verification Fail : is_unique is false " );
210- if (unique_counter < current_validators.threshold)
212+ if (unique_counter * 100 < current_validators.threshold)
211213 revert (
212214 "Verification Fail : unique_counter lower current_validators.threshold "
213215 );
You can’t perform that action at this time.
0 commit comments