Skip to content

change paritipantsIndex from hashmap to array#95

Open
makoto wants to merge 1 commit intomasterfrom
map-to-array
Open

change paritipantsIndex from hashmap to array#95
makoto wants to merge 1 commit intomasterfrom
map-to-array

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