Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change paritipantsIndex from hashmap to array #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

makoto
Copy link
Owner

@makoto makoto commented Nov 13, 2017

I changed participantsIndex from hashmap to array. This has a slight penalty on gas cost (contract create 1686592 -> 1764065, and register 119996 -> 120265), but it enables me to get the whole array using getParticipants function. I believe that this was impossible with hashmap. This change should retain the interface exactly as is.

@makoto
Copy link
Owner Author

makoto commented Nov 13, 2017

One of the problems is that this actually breaks compatibility with old contract as the old contract does not have getParticipants. if I change dapp js to use getParticipants, it won't work against old contract anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant