Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix incorrect value from getTotalTokens when fees are cached #439
When a property was not created via a fixed issuance, we use a method of iterating over the tally map to calculate the total number of tokens.
However after fees are activated, some tokens may not be in the tally, instead being held in the fee cache.
This change is consensus breaking.
If we want to provide accurate data :)
Let's take a couple examples:
So to answer your question, yes I really do believe we need to count cached amounts -
TL:DR; if we activate fees as is there are scenarios where we could break things and I'm a bit worried about that.
Thanks for laying out examples. I agree, we really shouldn't activate before this is fixed. :)
Hmm.. so this makes 0.2 consensus breaking. Do you think we should also publish an updated 0.10 based version? I think we might, if we release them simultaneously.
Dec 12, 2016
1 check failed
added a commit
this pull request
Dec 12, 2016
Yeah, that's what I really didn't like about the change. I really liked the idea of having 0.2 be a release that didn't change any rules.
Perhaps we could do a
I'm also going to take another look at fees to see if there is anything else I can find.
Sounds fine to me. We could then release it with 0.2, and provide a choice for users.
Hmm.. we should encourage people to use 0.2 anyway, so I don't think it's worth porting, but I wouldn't mind either. :)