Open JhChoy opened 6 years ago
revoke function
Yeah, revoke()
is withholded because of necessity. Then, we make a getBack()
function on vote contract instead of revoke()
.
You mean mapping(address=>vote_receipt) party_dict
? If we use only address[] party_list
, we should bear a huge operation when deletion of some addresses. Because in the middle of account is eliminated, it is necessary to pull up all accounts behind eliminated account. But if we use mapping(address=>vote_receipt) party_dict
, we don't need any additional operation(because we mask the boolean as false/true) and also get the personal information such as voting power.
And, I agree that separating party list into two groups.
Agree with that point.
Sry for latest commit. Please check party_list
I've changed it to address[]
. And please do the splitting party_dict
process together.
revoke function I don't think it's necessary. We designed voters to make cancel and re-vote easily.
index_party_list we can omit it by using
address[] party_list
instead ofmapping(uint=>address) party_list
Also, we should separate functions of developers(or lockedTokens) and normal voters. Actually developers(and lockedTokens) can't vote via normal
vote
function because they are locked in one contract(VestingTokens.sol
). Then, we can separateparty_list
tolocked_party_list
andpublic_party_list
. This process doesn't needisDeveloper
check process of_snapshot
function. Above dividing process could reduce gas prices of_snapshot
function