Skip to content

Commit 7cd9d25

Browse files
authored
optimize setParemeteres (#98)
1 parent c3751f7 commit 7cd9d25

File tree

4 files changed

+1742
-1566
lines changed

4 files changed

+1742
-1566
lines changed

contracts/votingMachines/GenesisProtocolLogic.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ contract GenesisProtocolLogic is IntVoteInterfaceEvents {
211211
require(_params[9] > 0, "daoBountyConst should be > 0");
212212

213213
bytes32 paramsHash = getParametersHash(_params, _voteOnBehalf);
214+
if (parameters[paramsHash].queuedVoteRequiredPercentage > 0) {
215+
//parameters already been set
216+
return paramsHash;
217+
}
214218
//set a limit for power for a given alpha to prevent overflow
215219
uint256 limitExponent = 172;//for alpha less or equal 2
216220
uint256 j = 2;

0 commit comments

Comments
 (0)